Get rid of some platform-specific functions examining window
[bpt/emacs.git] / src / w32menu.c
index 0c8d5ca..346402b 100644 (file)
@@ -140,8 +140,6 @@ otherwise it is "Question". */)
   FRAME_PTR f = NULL;
   Lisp_Object window;
 
-  check_window_system ();
-
   /* Decode the first argument: find the window or frame to use.  */
   if (EQ (position, Qt)
       || (CONSP (position) && (EQ (XCAR (position), Qmenu_bar)
@@ -194,6 +192,8 @@ otherwise it is "Question". */)
        but I don't want to make one now.  */
     CHECK_WINDOW (window);
 
+  check_window_system (f);
+
 #ifndef HAVE_DIALOGS
 
   {