summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wimpress <[email protected]>2015-06-15 20:07:48 +0100
committerMartin Wimpress <[email protected]>2015-06-15 20:07:48 +0100
commit77d3fe8eb9c69de333a53e54c681d27eff6ec223 (patch)
treee8180ada8196e37da6a3d20079915cc8c69296e7
parent309ba23a39b9f9fb6cbbc816d94f656bc66e3882 (diff)
parentfbbdd73f7b53b41a56ad79e412583c6a39141dc4 (diff)
downloadeom-77d3fe8eb9c69de333a53e54c681d27eff6ec223.tar.bz2
eom-77d3fe8eb9c69de333a53e54c681d27eff6ec223.tar.xz
Merge pull request #80 from NiceandGently/dev-toolbar
GTK3: toolbar-editor: Fix a crash when dropping an item to the toolbar
-rw-r--r--cut-n-paste/toolbar-editor/egg-editable-toolbar.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
index 006980e..b8ea050 100644
--- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
+++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
@@ -549,8 +549,13 @@ action_sensitive_cb (GtkAction *action,
GParamSpec *pspec,
GtkToolItem *item)
{
- EggEditableToolbar *etoolbar = EGG_EDITABLE_TOOLBAR
- (gtk_widget_get_ancestor (GTK_WIDGET (item), EGG_TYPE_EDITABLE_TOOLBAR));
+ EggEditableToolbar *etoolbar;
+ GtkWidget *ancestor = gtk_widget_get_ancestor (GTK_WIDGET (item), EGG_TYPE_EDITABLE_TOOLBAR);
+
+ if (!ancestor)
+ return;
+
+ etoolbar = EGG_EDITABLE_TOOLBAR (ancestor);
if (etoolbar->priv->edit_mode > 0)
{