app: simpler code in view_close_cmd_callback()

This commit is contained in:
Michael Natterer 2012-12-12 23:25:45 +01:00
parent efe01acb5d
commit 59f67e0503

View file

@ -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);
}