Avoid GtkCritical in recode dialog
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 1 Jul 2011 16:38:05 +0000 (18:38 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 1 Jul 2011 16:38:05 +0000 (18:38 +0200)
src/ui/gui/recode-dialog.c

index 55376644f1b00cda4f80431ec175cab1baa5be66..5d97c156c4d9b5175af3295f9e6248679bd4748b 100644 (file)
@@ -364,7 +364,7 @@ refresh (PsppireDialog *dialog, struct recode_dialog *rd)
   gtk_widget_set_sensitive (rd->new_name_entry, FALSE);
   gtk_widget_set_sensitive (rd->new_label_entry, FALSE);
 
-  if ( rd->different )
+  if ( rd->different && rd->varmap )
     g_hash_table_remove_all (rd->varmap);
 
   gtk_list_store_clear (GTK_LIST_STORE (rd->value_map));
@@ -1068,7 +1068,8 @@ recode_dialog (PsppireDataWindow *de, gboolean diff)
       break;
     }
 
-  g_hash_table_destroy (rd.varmap);
+  if (rd.varmap)
+    g_hash_table_destroy (rd.varmap);
 
   gtk_list_store_clear (GTK_LIST_STORE (rd.value_map));
   g_object_unref (rd.value_map);