* widget.c (update_wm_hints): Return if wmshell is null.
[bpt/emacs.git] / src / widget.c
index 181811b..96bfd47 100644 (file)
@@ -476,6 +476,9 @@ update_wm_hints (EmacsFrame ew)
   int base_height;
   int min_rows = 0, min_cols = 0;
 
+  /* This happens when the frame is just created.  */
+  if (! wmshell) return;
+
 #if 0
   check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols);
 #endif
@@ -506,6 +509,14 @@ update_wm_hints (EmacsFrame ew)
                 NULL);
 }
 
+void
+widget_update_wm_size_hints (Widget widget)
+{
+  EmacsFrame ew = (EmacsFrame)widget;
+  update_wm_hints (ew);
+}
+
+
 #if 0
 
 static void