Index: gdk/win32/gdkevents-win32.c
===================================================================
--- gdk/win32/gdkevents-win32.c	(revision 19219)
+++ gdk/win32/gdkevents-win32.c	(working copy)
@@ -1288,10 +1288,13 @@
 	    }
 	}
 
-      if (!hide_window)
-	ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
-      else
-	ShowWindow (GDK_WINDOW_HWND (window), SW_MINIMIZE);
+      if (GDK_WINDOW_IS_MAPPED (window))
+	{
+	  if (!hide_window)
+	    ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
+	  else
+	    ShowWindow (GDK_WINDOW_HWND (window), SW_MINIMIZE);
+	}
 
       impl->changing_state = FALSE;
     }
