From 5dd7b6443b0e455eb33af62427764216fceb0bd4 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 3 Jun 2005 23:53:48 +0000 Subject: [PATCH] bail out early if the view has no container (instead of crashing). 2005-06-04 Michael Natterer * app/widgets/gimpcontainertreeview-dnd.c (gimp_container_tree_view_drop_status): bail out early if the view has no container (instead of crashing). --- ChangeLog | 6 ++++++ app/widgets/gimpcontainertreeview-dnd.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d51d8977ca..4ddc6325f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-06-04 Michael Natterer + + * app/widgets/gimpcontainertreeview-dnd.c + (gimp_container_tree_view_drop_status): bail out early if the view + has no container (instead of crashing). + 2005-06-03 Manish Singh * libgimpcolor/gimprgb.h: whitespace fix. diff --git a/app/widgets/gimpcontainertreeview-dnd.c b/app/widgets/gimpcontainertreeview-dnd.c index 3b13d34344..639781eeae 100644 --- a/app/widgets/gimpcontainertreeview-dnd.c +++ b/app/widgets/gimpcontainertreeview-dnd.c @@ -58,7 +58,8 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view, GtkTreeViewDropPosition drop_pos = GTK_TREE_VIEW_DROP_BEFORE; GdkDragAction drag_action = 0; - if (! gimp_container_view_get_reorderable (GIMP_CONTAINER_VIEW (tree_view))) + if (! gimp_container_view_get_container (GIMP_CONTAINER_VIEW (tree_view)) || + ! gimp_container_view_get_reorderable (GIMP_CONTAINER_VIEW (tree_view))) goto drop_impossible; target_list = gtk_drag_dest_get_target_list (GTK_WIDGET (tree_view->view));