+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)
+
2005-09-11 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
+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)
+
2005-09-11 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
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)
* @tree_view: a #GtkTreeView
* @path: a #GtkTreePath in @tree_view
*
- * Creates a #GdkPixmap representation of the row at @path. This image is used
- * for a drag icon.
+ * Creates a #GdkPixmap representation of the row at @path.
+ * This image is used for a drag icon.
*
* Return value: a newly-allocated pixmap of the drag icon.
**/
gint bin_window_width;
gboolean is_separator = FALSE;
+ g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), NULL);
+ g_return_val_if_fail (path != NULL, NULL);
+
widget = GTK_WIDGET (tree_view);
+ if (!GTK_WIDGET_REALIZED (tree_view))
+ return NULL;
+
depth = gtk_tree_path_get_depth (path);
_gtk_tree_view_find_node (tree_view,