Fixed crash which occured when deleting dictionaries which had variable labels
authorJohn Darrington <john@darrington.wattle.id.au>
Tue, 17 Mar 2009 23:44:32 +0000 (08:44 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Tue, 17 Mar 2009 23:44:32 +0000 (08:44 +0900)
src/data/dictionary.c

index f6776780fe7362a61ec1545fa8037dada890c8e4..ba840898112494b775d02c810edee29c98037fee 100644 (file)
@@ -1348,6 +1348,9 @@ dict_var_changed (const struct variable *v)
       const struct vardict_info *vdi = var_get_vardict (v);
       struct dictionary *d = vdi->dict;
 
+      if ( NULL == d)
+       return;
+
       if (d->changed ) d->changed (d, d->changed_data);
       if ( d->callbacks && d->callbacks->var_changed )
        d->callbacks->var_changed (d, var_get_dict_index (v), d->cb_data);