bail out early if the view has no container (instead of crashing).

2005-06-04  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpcontainertreeview-dnd.c
	(gimp_container_tree_view_drop_status): bail out early if the view
	has no container (instead of crashing).
This commit is contained in:
Michael Natterer 2005-06-03 23:53:48 +00:00 committed by Michael Natterer
parent 24b3e080f6
commit 5dd7b6443b
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-06-04 Michael Natterer <mitch@gimp.org>
* 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 <yosh@gimp.org>
* libgimpcolor/gimprgb.h: whitespace fix.

View File

@ -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));