1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-03 12:31:32 -08:00

Fix crash on creating child frames.

* src/pgtkfns.c (frame_geometry): Returns nil when no widget.
This commit is contained in:
Yuuki Harano 2020-09-29 17:20:59 +09:00 committed by Jeff Walsh
parent 0b69b73baa
commit b60d4c9db0

View 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;