aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg/egg-toolbar-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/egg/egg-toolbar-editor.c')
-rwxr-xr-xlib/egg/egg-toolbar-editor.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/egg/egg-toolbar-editor.c b/lib/egg/egg-toolbar-editor.c
index e77c801f0..991f4843b 100755
--- a/lib/egg/egg-toolbar-editor.c
+++ b/lib/egg/egg-toolbar-editor.c
@@ -306,11 +306,18 @@ editor_drag_data_received_cb (GtkWidget *widget,
EggToolbarEditor *editor)
{
GtkAction *action;
+ const char *data;
g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (editor));
g_return_if_fail (selection_data != NULL);
- action = find_action (editor, (const char *)selection_data->data);
+ if (selection_data->length <= 0 || selection_data->data == NULL) return;
+
+ data = (const char *) selection_data->data;
+
+ if (strcmp (data, "separator") == 0) return;
+
+ action = find_action (editor, data);
g_return_if_fail (action != NULL);
if (g_list_find (editor->priv->default_actions_list, action))