mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
guard gtk_widget_get_snapshot() against invalid or invisible widgets.
2008-05-27 10:33:41 Tim Janik <timj@imendio.com> * gtk/gtkwidget.c: guard gtk_widget_get_snapshot() against invalid or invisible widgets. svn path=/trunk/; revision=20187
This commit is contained in:
parent
3f26314d0f
commit
727a7dbf46
@ -1,3 +1,8 @@
|
||||
2008-05-27 10:33:41 Tim Janik <timj@imendio.com>
|
||||
|
||||
* gtk/gtkwidget.c: guard gtk_widget_get_snapshot() against
|
||||
invalid or invisible widgets.
|
||||
|
||||
2008-05-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Bug 531008 – Crash in gtkprintunixdialog.c
|
||||
|
@ -8356,6 +8356,10 @@ gtk_widget_get_snapshot (GtkWidget *widget,
|
||||
GdkPixmap *pixmap;
|
||||
GList *windows = NULL, *list;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
|
||||
if (!GTK_WIDGET_VISIBLE (widget))
|
||||
return NULL;
|
||||
|
||||
/* the widget (and parent_window) must be realized to be drawable */
|
||||
if (widget->parent && !GTK_WIDGET_REALIZED (widget->parent))
|
||||
gtk_widget_realize (widget->parent);
|
||||
|
Loading…
Reference in New Issue
Block a user