[gaim-migrate @ 15536]

Wed, 08 Feb 2006 04:20:05 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Wed, 08 Feb 2006 04:20:05 +0000
changeset 13174
26da87cde30c
parent 13173
e9c2d7cd21c6
child 13175
1533c5c19b3e

[gaim-migrate @ 15536]
SF Patch #1425827 from Sadrul

"Start gaim with -c /dev/null, try to add a new status.
gaim seems to crash here."

I wasn't able to reproduce this crash, but the changes look okay anyway.
Let me know if you think this is wrong...

committer: Richard Laager <rlaager@pidgin.im>

src/gtksavedstatuses.c file | annotate | diff | comparison | revisions
--- a/src/gtksavedstatuses.c	Wed Feb 08 04:13:10 2006 +0000
+++ b/src/gtksavedstatuses.c	Wed Feb 08 04:20:05 2006 +0000
@@ -146,7 +146,7 @@
 	GtkTreeModel *model;
 	char *cur;
 
-	if (status_window == NULL)
+	if (status_window == NULL || title == NULL)
 		return FALSE;
 
 	model = GTK_TREE_MODEL(status_window->model);
@@ -1020,13 +1020,14 @@
 
 	/* Find a possible window for this saved status and present it */
 	if (status_window) {
-		status_window_find_savedstatus(&iter, gaim_savedstatus_get_title(saved_status));
-		gtk_tree_model_get(GTK_TREE_MODEL(status_window->model), &iter,
-							STATUS_WINDOW_COLUMN_WINDOW, &dialog,
-							-1);
-		if (dialog) {
-			gtk_window_present(GTK_WINDOW(dialog->window));
-			return;
+		if (status_window_find_savedstatus(&iter, gaim_savedstatus_get_title(saved_status))) {
+			gtk_tree_model_get(GTK_TREE_MODEL(status_window->model), &iter,
+								STATUS_WINDOW_COLUMN_WINDOW, &dialog,
+								-1);
+			if (dialog) {
+				gtk_window_present(GTK_WINDOW(dialog->window));
+				return;
+			}
 		}
 	}
 

mercurial