[glade] * plugins/gtk+/glade-gtk.c: Fixed warnings from glade_gtk_box_get_first_blank() when project clo
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] * plugins/gtk+/glade-gtk.c: Fixed warnings from glade_gtk_box_get_first_blank() when project clo
- Date: Sun, 16 Jan 2011 08:09:42 +0000 (UTC)
commit 861ce243cdbb24597a96d7680c817a09a0070efb
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun Jan 16 17:12:04 2011 +0900
* plugins/gtk+/glade-gtk.c: Fixed warnings from glade_gtk_box_get_first_blank() when
project closes.
ChangeLog | 5 +++++
plugins/gtk+/glade-gtk.c | 7 +++++--
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index dcce369..187f0b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-16 Tristan Van Berkom <tristanvb openismus com>
+
+ * plugins/gtk+/glade-gtk.c: Fixed warnings from glade_gtk_box_get_first_blank() when
+ project closes.
+
2011-01-15 Emilio Pozuelo Monfort <pochu27 gmail com>
* plugins/gtk+/Makefile.am: Don't install .in files.
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index a4307c6..2e89abb 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -1606,10 +1606,13 @@ glade_gtk_box_get_first_blank (GtkBox * box)
if ((gwidget = glade_widget_get_from_gobject (widget)) != NULL)
{
- gint gwidget_position;
+ gint gwidget_position = 0;
GladeProperty *property =
glade_widget_get_pack_property (gwidget, "position");
- gwidget_position = g_value_get_int (glade_property_inline_value (property));
+
+ /* property can be NULL here when project is closing */
+ if (property)
+ gwidget_position = g_value_get_int (glade_property_inline_value (property));
if (gwidget_position > position)
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]