mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 19:43:01 +00:00
app: simpler code in view_close_cmd_callback()
This commit is contained in:
parent
efe01acb5d
commit
59f67e0503
|
@ -99,15 +99,13 @@ view_close_cmd_callback (GtkAction *action,
|
|||
GimpDisplay *display;
|
||||
GimpDisplayShell *shell;
|
||||
GimpImage *image;
|
||||
|
||||
return_if_no_display (display, data);
|
||||
shell = gimp_display_get_shell(display);
|
||||
|
||||
shell = gimp_display_get_shell (display);
|
||||
image = gimp_display_get_image (display);
|
||||
|
||||
/* Check for active image so we don't close the last display. */
|
||||
if (! GIMP_IS_IMAGE (image) || ! gimp_image_get_active_drawable (image))
|
||||
return;
|
||||
if (shell)
|
||||
if (shell && image)
|
||||
gimp_display_shell_close (shell, FALSE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue