Prevent critical when closing output viewer 20100912040502/pspp 20100913040502/pspp 20100914040502/pspp
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 11 Sep 2010 08:26:05 +0000 (10:26 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 11 Sep 2010 08:26:05 +0000 (10:26 +0200)
src/ui/gui/psppire-output-window.c

index 9886810f1134f109d7cc5496ad36f5876e587090..4bf8ce5b287918488249cd7df3af47448047d89d 100644 (file)
@@ -109,7 +109,8 @@ psppire_output_window_dispose (GObject *obj)
   viewer->items = NULL;
   viewer->n_items = viewer->allocated_items = 0;
 
-  g_object_unref (viewer->print_settings);
+  if (viewer->print_settings != NULL)
+    g_object_unref (viewer->print_settings);
 
   /* Chain up to the parent class */
   G_OBJECT_CLASS (parent_class)->dispose (obj);