Commit 727a7dbf authored by 10:33:41  Tim Janik's avatar 10:33:41 Tim Janik Committed by Tim Janik

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
parent 3f26314d
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment