Bug 643587 - Opening two xcf with vectors crashes gimp

Fix the crash and the warning pointed out in the bug.
This commit is contained in:
Michael Natterer
2011-03-01 17:05:58 +01:00
parent 30e847c921
commit ebe4b4102f
2 changed files with 9 additions and 7 deletions

View File

@ -224,7 +224,7 @@ gimp_canvas_path_get_extents (GimpCanvasItem *item,
{
GimpCanvasPathPrivate *private = GET_PRIVATE (item);
if (private->path)
if (private->path && gtk_widget_get_realized (shell->canvas))
{
cairo_t *cr;
GdkRectangle rectangle;

View File

@ -673,9 +673,10 @@ gimp_display_shell_sample_point_add_handler (GimpImage *image,
item = gimp_canvas_proxy_group_get_item (group, sample_point);
g_object_set (item,
"index", i,
NULL);
if (item)
g_object_set (item,
"index", i,
NULL);
}
}
@ -699,9 +700,10 @@ gimp_display_shell_sample_point_remove_handler (GimpImage *image,
item = gimp_canvas_proxy_group_get_item (group, sample_point);
g_object_set (item,
"index", i,
NULL);
if (item)
g_object_set (item,
"index", i,
NULL);
}
}