diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-09-13 13:33:01 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-09-13 13:33:01 +0000 |
commit | 676b09e79803d11aa66784595b8c4fbabbe67a09 (patch) | |
tree | 4584dff04c6b9caa2efe9d57d41b66ddcc814ee2 /gtk/gtkiconview.c | |
parent | fbd3568e4c60771823bba542cd7d79c179fde559 (diff) | |
download | gtk+-676b09e79803d11aa66784595b8c4fbabbe67a09.tar.gz |
Silently return NULL if the widget is not realized. (#316023, Guillaume
2005-09-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon):
* gtk/gtkiconview.c (gtk_icon_view_create_drag_icon): Silently
return NULL if the widget is not realized. (#316023,
Guillaume Cottenceau)
Diffstat (limited to 'gtk/gtkiconview.c')
-rw-r--r-- | gtk/gtkiconview.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 1a68ba96fc..28cacfdf61 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -6658,8 +6658,14 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view, gint index; GdkRectangle area; + g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), NULL); + g_return_val_if_fail (path != NULL, NULL); + widget = GTK_WIDGET (icon_view); + if (!GTK_WIDGET_REALIZED (widget)) + return NULL; + index = gtk_tree_path_get_indices (path)[0]; for (l = icon_view->priv->items; l; l = l->next) |