]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crash on creating child frames.
authorYuuki Harano <masm+github@masm11.me>
Tue, 29 Sep 2020 08:20:59 +0000 (17:20 +0900)
committerJeff Walsh <jeff.walsh@drtusers-MacBook-Pro.local>
Tue, 24 Nov 2020 01:24:40 +0000 (12:24 +1100)
* src/pgtkfns.c (frame_geometry): Returns nil when no widget.

src/pgtkfns.c

index c6909ba3d6325691e5b37259c6c236ba75220122..4ecb03b91c0848cd50bbc5ada4a9abdde02b3fd2 100644 (file)
@@ -3316,6 +3316,8 @@ frame_geometry (Lisp_Object frame, Lisp_Object attribute)
     gtk_window_get_position (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
                             &left_pos, &top_pos);
   } else {
+    if (FRAME_GTK_WIDGET (f) == NULL)
+      return Qnil;    /* This can occur while creating a frame. */
     GtkAllocation alloc;
     gtk_widget_get_allocation (FRAME_GTK_WIDGET (f), &alloc);
     left_pos = alloc.x;