diff libpurple/protocols/sametime/sametime.c @ 16060:9fb7f9413174

Avoid a possible NULL pointer dereference
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 11 Apr 2007 13:34:40 +0000
parents 32c366eeeb99
children 391a79778f89 08db93bbd798
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;