X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-store.c;h=047cca78113fddef9a70e1f53becabfc0cacb9fb;hb=9d1bfb34842de4a129140622ee3d800297c0e69d;hp=83933c474c8c241b7628b10d7fd3db6545689f7f;hpb=0fe886a656b0ee57b4d542b7c16b3c56288b6fc6;p=pspp diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 83933c474c..047cca7811 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -389,6 +389,13 @@ psppire_data_store_set_dictionary (PsppireDataStore *data_store, PsppireDict *di static void psppire_data_store_finalize (GObject *object) { + PsppireDataStore *ds = PSPPIRE_DATA_STORE (object); + + if (ds->datasheet) + { + datasheet_destroy (ds->datasheet); + ds->datasheet = NULL; + } /* must chain up */ (* parent_class->finalize) (object); @@ -403,11 +410,6 @@ psppire_data_store_dispose (GObject *object) if (ds->dispose_has_run) return; - if (ds->datasheet) - { - datasheet_destroy (ds->datasheet); - ds->datasheet = NULL; - } /* must chain up */ (* parent_class->dispose) (object);