diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index b19a643059..7a3d13c96a 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -12291,7 +12291,8 @@ _gtk_window_set_popover_position (GtkWindow *window, data->rect = *rect; data->pos = pos; - if (gtk_widget_is_visible (popover) && !data->window) + if (gtk_widget_is_visible (popover) && !data->window && + gtk_widget_get_realized (GTK_WIDGET (window))) { popover_realize (popover, data, window); popover_map (popover, data);