changeset 13173:07ecd51f1f07

[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: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 08 Feb 2006 04:20:05 +0000
parents 12d960995cdc
children e29845c34565
files src/gtksavedstatuses.c
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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;
+			}
 		}
 	}