changeset 16060:9fb7f9413174

Avoid a possible NULL pointer dereference
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 11 Apr 2007 13:34:40 +0000
parents e1cd60075d08
children 3b86ad370861
files libpurple/protocols/sametime/sametime.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/sametime/sametime.c	Wed Apr 11 13:34:17 2007 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Wed Apr 11 13:34:40 2007 +0000
@@ -4347,9 +4347,9 @@
   PurpleConnection *gc;
   struct mwPurplePluginData *pd;
 
-  if (data) {
-    buddy = data->buddy;
-  }
+  g_return_if_fail(data != NULL);
+
+  buddy = data->buddy;
 
   gc = purple_account_get_connection(buddy->account);
   pd = gc->proto_data;