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:
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user