diff --git a/magick/display.c b/magick/display.c
index 1a2d7de..c8df5d1 100644
--- a/magick/display.c
+++ b/magick/display.c
@@ -13111,9 +13111,9 @@
           if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
             break;
         }
+        image_view=DestroyCacheView(image_view);
         tile++;
       }
-      image_view=DestroyCacheView(image_view);
       windows->image.window_changes.width=(int) image->columns;
       windows->image.window_changes.height=(int) image->rows;
       XConfigureImageColormap(display,resource_info,windows,image);