mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix g_object warning for creating schedule from trans
When you try and schedule an open transaction like the blank transaction a dialog warns you and prevents doing so. As a result a couple of objects were being unrefed which had not be created so add a test for the objects before being unrefed.
This commit is contained in:
parent
f6c73b15fb
commit
99f067ffe3
@ -623,9 +623,10 @@ sxftd_destroy( GtkWidget *w, gpointer user_data )
|
||||
xaccSchedXactionDestroy(sxfti->sx);
|
||||
sxfti->sx = NULL;
|
||||
}
|
||||
|
||||
g_object_unref(G_OBJECT(sxfti->dense_cal_model));
|
||||
g_object_unref(G_OBJECT(sxfti->example_cal));
|
||||
if (sxfti->dense_cal_model)
|
||||
g_object_unref(G_OBJECT(sxfti->dense_cal_model));
|
||||
if (sxfti->example_cal)
|
||||
g_object_unref(G_OBJECT(sxfti->example_cal));
|
||||
|
||||
g_free(sxfti);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user