ref/unref the view around the calls to gimp_container_view_item_selected()
2004-08-03 Michael Natterer <mitch@gimp.org> * app/widgets/gimpcontainergridview.c (gimp_container_grid_view_item_context): ref/unref the view around the calls to gimp_container_view_item_selected() and _item_context() because the former may destroy the view which leads to a crash when trying the latter. Fixes bug #148955.
This commit is contained in:

committed by
Michael Natterer

parent
b909c2b2ee
commit
8260cd69ce
@ -1,3 +1,11 @@
|
||||
2004-08-03 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/widgets/gimpcontainergridview.c
|
||||
(gimp_container_grid_view_item_context): ref/unref the view around
|
||||
the calls to gimp_container_view_item_selected() and _item_context()
|
||||
because the former may destroy the view which leads to a crash
|
||||
when trying the latter. Fixes bug #148955.
|
||||
|
||||
2004-08-03 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimpimage-undo.[ch] (gimp_image_undo_can_compress):
|
||||
|
@ -576,12 +576,19 @@ static void
|
||||
gimp_container_grid_view_item_context (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
/* ref the view because calling gimp_container_view_item_selected()
|
||||
* may destroy the widget
|
||||
*/
|
||||
g_object_ref (data);
|
||||
|
||||
if (gimp_container_view_item_selected (GIMP_CONTAINER_VIEW (data),
|
||||
GIMP_PREVIEW (widget)->viewable))
|
||||
{
|
||||
gimp_container_view_item_context (GIMP_CONTAINER_VIEW (data),
|
||||
GIMP_PREVIEW (widget)->viewable);
|
||||
}
|
||||
|
||||
g_object_unref (data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user