Commit cc47597a authored by Jehan's avatar Jehan
Browse files

app: gimp_image_merge_down() on a floating selection crashes GIMP.

Forbid merging down a floating selection.
Probably we can do something better. But that's a first step.
parent d3cfdf7a
...@@ -239,6 +239,13 @@ gimp_image_merge_down (GimpImage *image, ...@@ -239,6 +239,13 @@ gimp_image_merge_down (GimpImage *image,
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL); g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL);
if (gimp_layer_is_floating_sel (current_layer))
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Cannot merge down a floating selection."));
return NULL;
for (list = gimp_item_get_container_iter (GIMP_ITEM (current_layer)); for (list = gimp_item_get_container_iter (GIMP_ITEM (current_layer));
list; list;
list = g_list_next (list)) list = g_list_next (list))
Supports Markdown
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