mirror of https://github.com/GNOME/gimp.git
core: Fix crash when cutting/pasting single layer
When cutting and pasting a single layer, drawables->data might be empty. This results in a crash on Windows and a failure to paste on Linux. Since this function is inside an IF statement that already confirms it has a valid image, the base type and precision are retrieved from there instead.
This commit is contained in:
parent
a331e91309
commit
d120e592d8
|
@ -520,8 +520,8 @@ gimp_edit_paste_get_layers (GimpImage *image,
|
|||
}
|
||||
|
||||
layers = gimp_edit_paste_get_tagged_layers (image, layers, NULL, floating_format,
|
||||
gimp_drawable_get_base_type (drawables->data),
|
||||
gimp_drawable_get_precision (drawables->data),
|
||||
gimp_image_get_base_type (image),
|
||||
gimp_image_get_precision (image),
|
||||
*paste_type);
|
||||
layers = g_list_reverse (layers);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue