check if re->edit != NULL before trying to unref it. Fixes a segfault when

2002-01-26  Mikael Hallendal  <micke@codefactory.se>

	* rule-editor.c (add_editor_clicked): check if re->edit != NULL
	  before trying to unref it. Fixes a segfault when closing the
	  rule editor.

svn path=/trunk/; revision=15483
This commit is contained in:
Mikael Hallendal
2002-01-26 22:17:35 +00:00
committed by Mikael Hallendal
parent 81a90e2532
commit 09f9d4896e
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-01-26 Mikael Hallendal <micke@codefactory.se>
* rule-editor.c (add_editor_clicked): check if re->edit != NULL
before trying to unref it. Fixes a segfault when closing the
rule editor.
2002-01-15 Not Zed <NotZed@Ximian.com>
* filter-input.c (xml_decode): If we write "" to an xml file, we

View File

@ -253,7 +253,10 @@ add_editor_clicked (GtkWidget *dialog, int button, RuleEditor *re)
default:
gnome_dialog_close (GNOME_DIALOG (dialog));
case -1:
gtk_object_unref (GTK_OBJECT (re->edit));
if (re->edit) {
gtk_object_unref (GTK_OBJECT (re->edit));
}
re->edit = NULL;
re->dialog = NULL;