Use the local shell variable and don't call get_shell() again

This commit is contained in:
Michael Natterer 2009-10-07 19:59:54 +02:00
parent e57b0eee63
commit 1ae5d6ad8d
1 changed files with 3 additions and 3 deletions

View File

@ -617,13 +617,15 @@ gimp_display_set_image (GimpDisplay *display,
private = GIMP_DISPLAY_GET_PRIVATE (display);
shell = gimp_display_get_shell (display);
if (display->image)
{
/* stop any active tool */
tool_manager_control_active (display->gimp, GIMP_TOOL_ACTION_HALT,
display);
gimp_display_shell_disconnect (gimp_display_get_shell (display));
gimp_display_shell_disconnect (shell);
old_image = g_object_ref (display->image);
@ -640,8 +642,6 @@ gimp_display_set_image (GimpDisplay *display,
if (old_image)
g_object_unref (old_image);
shell = gimp_display_get_shell (display);
if (shell)
{
if (image)