From: Yuuki Harano Date: Tue, 29 Sep 2020 08:20:59 +0000 (+0900) Subject: Fix crash on creating child frames. X-Git-Tag: emacs-29.0.90~3774 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b60d4c9db018bf64ea2eb1ecf434708a7ee82c67;p=emacs.git Fix crash on creating child frames. * src/pgtkfns.c (frame_geometry): Returns nil when no widget. --- diff --git a/src/pgtkfns.c b/src/pgtkfns.c index c6909ba3d63..4ecb03b91c0 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -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;