summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pgtkfns.c2
1 files changed, 2 insertions, 0 deletions
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;