[glade/composite-templates-new: 2/10] GladeEditor: Avoid crash when draging and dropping a widget with packing properties
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/composite-templates-new: 2/10] GladeEditor: Avoid crash when draging and dropping a widget with packing properties
- Date: Sat, 6 Apr 2013 14:17:22 +0000 (UTC)
commit becf88797bb40e1b084559bb526fdc576f3e6462
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sat Apr 6 16:47:44 2013 +0900
GladeEditor: Avoid crash when draging and dropping a widget with packing properties
This was not reproducible in all cases, but dragging the notebook inside
of the Glade preferences dialog outside of it's dialog caused a crash,
the fix was however obvious enough.
gladeui/glade-editor.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/gladeui/glade-editor.c b/gladeui/glade-editor.c
index f785074..bbf49c4 100644
--- a/gladeui/glade-editor.c
+++ b/gladeui/glade-editor.c
@@ -671,12 +671,17 @@ glade_editor_load_editable (GladeEditor *editor,
/* Use the parenting adaptor for packing pages... so deffer creating the widgets
* until load time.
*/
- if (type == GLADE_PAGE_PACKING && parent)
+ if (type == GLADE_PAGE_PACKING)
{
- GladeWidgetAdaptor *adaptor = glade_widget_get_adaptor (parent);
+ GladeWidgetAdaptor *adaptor;
+
+ if (!parent)
+ return;
+
+ adaptor = glade_widget_get_adaptor (parent);
editable =
- glade_editor_load_editable_in_page (editor, adaptor,
- GLADE_PAGE_PACKING);
+ glade_editor_load_editable_in_page (editor, adaptor,
+ GLADE_PAGE_PACKING);
}
else
editable =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]