mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
app: Partial fix for #13702 infinite loop on startup
If somehow an image is not passed when opened from the command line, this avoids an infinite loop as was seen in #13702 This still does not solve the issue of how a bad image was passed in in the first place.
This commit is contained in:
parent
994cb2b21f
commit
d46b6e4e0e
1 changed files with 5 additions and 0 deletions
|
@ -749,6 +749,11 @@ static void
|
||||||
file_open_sanitize_image (GimpImage *image,
|
file_open_sanitize_image (GimpImage *image,
|
||||||
gboolean as_new)
|
gboolean as_new)
|
||||||
{
|
{
|
||||||
|
/* This should never occur, but apparently it does sometimes #13702
|
||||||
|
* Avoids infinite loop in the while statement below.
|
||||||
|
*/
|
||||||
|
g_return_if_fail (GIMP_IS_IMAGE (image));
|
||||||
|
|
||||||
if (as_new)
|
if (as_new)
|
||||||
gimp_image_set_file (image, NULL);
|
gimp_image_set_file (image, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue