Commit b118e824 authored by Massimo Valentini's avatar Massimo Valentini Committed by Jehan

Bug 784647: Crash when choosing debug option Show Image Graph

The attached patch avoids CRITICALs when executing Debug actions
with no images open.
1) do not run projection benchmark unless there is an image
2) memsize of pluginmanager member was incorrectly computed using
   gimp_object functions for 2 GObjects
parent 21cb905d
......@@ -282,22 +282,26 @@ debug_dump_attached_data_cmd_callback (GtkAction *action,
static gboolean
debug_benchmark_projection (GimpDisplay *display)
{
GimpImage *image = gimp_display_get_image (display);
GimpProjection *projection = gimp_image_get_projection (image);
GimpImage *image = gimp_display_get_image (display);
GIMP_TIMER_START ();
if (image)
{
GimpProjection *projection = gimp_image_get_projection (image);
GIMP_TIMER_START ();
gimp_image_invalidate (image,
0, 0,
gimp_image_get_width (image),
gimp_image_get_height (image));
gimp_projection_flush_now (projection);
gimp_image_invalidate (image,
0, 0,
gimp_image_get_width (image),
gimp_image_get_height (image));
gimp_projection_flush_now (projection);
gimp_display_flush_now (display);
gimp_display_flush_now (display);
GIMP_TIMER_END ("Validation of the entire projection");
GIMP_TIMER_END ("Validation of the entire projection");
g_object_unref (display);
g_object_unref (display);
}
return FALSE;
}
......
......@@ -192,10 +192,8 @@ gimp_plug_in_manager_get_memsize (GimpObject *object,
memsize += gimp_g_slist_get_memsize (manager->plug_in_stack, 0);
memsize += 0; /* FIXME manager->shm */
memsize += gimp_object_get_memsize (GIMP_OBJECT (manager->interpreter_db),
gui_size);
memsize += gimp_object_get_memsize (GIMP_OBJECT (manager->environ_table),
gui_size);
memsize += /* FIXME */ gimp_g_object_get_memsize (G_OBJECT (manager->interpreter_db));
memsize += /* FIXME */ gimp_g_object_get_memsize (G_OBJECT (manager->environ_table));
memsize += 0; /* FIXME manager->plug_in_debug */
memsize += gimp_g_list_get_memsize (manager->data_list, 0 /* FIXME */);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment