/pidgin/main: 0fcbcc3b45eb: Fix a NULL pointer misuse

Tomasz Wasilczyk twasilczyk at pidgin.im
Mon Mar 17 05:50:06 EDT 2014


Changeset: 0fcbcc3b45ebddfef0ced5943575d131580ff5ea
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-03-17 10:49 +0100
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/0fcbcc3b45eb

Description:

Fix a NULL pointer misuse

diffstat:

 libpurple/request-datasheet.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff --git a/libpurple/request-datasheet.c b/libpurple/request-datasheet.c
--- a/libpurple/request-datasheet.c
+++ b/libpurple/request-datasheet.c
@@ -335,7 +335,8 @@ purple_request_datasheet_record_add(Purp
 
 	rec = purple_request_datasheet_record_find(sheet, key);
 	if (rec != NULL) {
-		g_hash_table_remove(sheet->marked_for_rem, key);
+		if (sheet->marked_for_rem != NULL)
+			g_hash_table_remove(sheet->marked_for_rem, key);
 		return rec;
 	}
 



More information about the Commits mailing list