[farsight2/master] Check for NULL parameters too
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:24:12 PST 2008
---
gst-libs/gst/farsight/fs-base-conference.c | 4 ++++
gst-libs/gst/farsight/fs-conference-iface.c | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/gst-libs/gst/farsight/fs-base-conference.c b/gst-libs/gst/farsight/fs-base-conference.c
index 5cdc037..04dedf2 100644
--- a/gst-libs/gst/farsight/fs-base-conference.c
+++ b/gst-libs/gst/farsight/fs-base-conference.c
@@ -151,6 +151,8 @@ fs_base_conference_new_session (FsConference *conf,
FsSession *new_session = NULL;
+ g_return_val_if_fail (base_conf, NULL);
+ g_return_val_if_fail (klass, NULL);
g_return_val_if_fail (klass->new_session, NULL);
new_session = klass->new_session (base_conf, media_type, error);
@@ -213,6 +215,8 @@ fs_base_conference_new_participant (FsConference *conf,
FsBaseConference *baseconf = FS_BASE_CONFERENCE (conf);
FsBaseConferenceClass *klass = FS_BASE_CONFERENCE_GET_CLASS (conf);
+ g_return_val_if_fail (baseconf, NULL);
+ g_return_val_if_fail (klass, NULL);
g_return_val_if_fail (klass->new_participant, NULL);
return klass->new_participant (baseconf, cname, error);
diff --git a/gst-libs/gst/farsight/fs-conference-iface.c b/gst-libs/gst/farsight/fs-conference-iface.c
index 66d35a5..1417aea 100644
--- a/gst-libs/gst/farsight/fs-conference-iface.c
+++ b/gst-libs/gst/farsight/fs-conference-iface.c
@@ -121,6 +121,7 @@ fs_conference_new_session (FsConference *conference, FsMediaType media_type,
FsConferenceClass *iface =
FS_CONFERENCE_GET_IFACE (conference);
+ g_return_val_if_fail (iface, NULL);
g_return_val_if_fail (iface->new_session, NULL);
return iface->new_session (conference, media_type, error);
@@ -145,6 +146,7 @@ fs_conference_new_participant (FsConference *conference, gchar *cname,
FsConferenceClass *iface =
FS_CONFERENCE_GET_IFACE (conference);
+ g_return_val_if_fail (iface, NULL);
g_return_val_if_fail (iface->new_participant, NULL);
return iface->new_participant (conference, cname, error);
--
1.5.6.5
More information about the farsight-commits
mailing list