X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-selector.c;h=36cae5c18afe9aed88b4743f9bbdba9c31758fcf;hb=a74d90c5dd6dcbc257ceebf870506b442851c91e;hp=79601b64faf5a9f9a5bedd91d1f83ab8095809e4;hpb=1f4a1b37036b9a555e6a650f37f1d0ecc8b2c7a4;p=pspp diff --git a/src/ui/gui/psppire-selector.c b/src/ui/gui/psppire-selector.c index 79601b64fa..36cae5c18a 100644 --- a/src/ui/gui/psppire-selector.c +++ b/src/ui/gui/psppire-selector.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2010 Free Software Foundation + Copyright (C) 2007, 2009, 2010, 2012 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -812,6 +812,8 @@ update_model ( g_signal_connect_swapped (new_model, "row-inserted", G_CALLBACK (on_row_inserted), selector); + + g_object_unref (new_model); } } @@ -852,11 +854,14 @@ on_dest_model_changed (PsppireSelector *selector) { GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (selector->dest)); - g_signal_connect (model, "row-changed", G_CALLBACK (on_dest_data_change), - selector); - - g_signal_connect (model, "row-deleted", G_CALLBACK (on_dest_data_delete), - selector); + if ( model ) + { + g_signal_connect (model, "row-changed", G_CALLBACK (on_dest_data_change), + selector); + + g_signal_connect (model, "row-deleted", G_CALLBACK (on_dest_data_delete), + selector); + } } /* Set the destination widget to DEST */