changeset 24360:61f825f8b3a2

Fix CID #370
author Richard Laager <rlaager@wiktel.com>
date Fri, 14 Nov 2008 06:25:48 +0000
parents 42261d87854a
children 4152b5c1c051
files libpurple/protocols/simple/simple.c
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/simple/simple.c	Fri Nov 14 06:23:04 2008 +0000
+++ b/libpurple/protocols/simple/simple.c	Fri Nov 14 06:25:48 2008 +0000
@@ -1228,11 +1228,14 @@
 				if (purple_str_has_prefix(ssparts[i], "terminated"))
 				{
 					purple_debug_info("simple", "Subscription expired!");
-					g_free(b->dialog->ourtag);
-					g_free(b->dialog->theirtag);
-					g_free(b->dialog->callid);
-					g_free(b->dialog);
-					b->dialog = NULL;
+					if (b->dialog)
+					{
+						g_free(b->dialog->ourtag);
+						g_free(b->dialog->theirtag);
+						g_free(b->dialog->callid);
+						g_free(b->dialog);
+						b->dialog = NULL;
+					}
 
 					purple_prpl_got_user_status(sip->account, from, "offline", NULL);
 					break;