Mercurial > dwindows
changeset 296:d2392cf845e4
Fix crash if dw_icon_load_from_file() called before creating a toplevel
window. Only affects GTK < 2.0 and not using IMLIB.
Use correct cast for itemdata in _tree_select_event().
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 27 Mar 2003 06:32:53 +0000 |
parents | aac3ab26d636 |
children | 5414d3d582e4 |
files | gtk/dw.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/dw.c Wed Mar 26 07:03:04 2003 +0000 +++ b/gtk/dw.c Thu Mar 27 06:32:53 2003 +0000 @@ -514,7 +514,7 @@ { int (*treeselectfunc)(HWND, HWND, char *, void *, void *) = work->func; char *text = (char *)gtk_object_get_data(GTK_OBJECT(child), "text"); - void *itemdata = (char *)gtk_object_get_data(GTK_OBJECT(child), "itemdata"); + void *itemdata = (void *)gtk_object_get_data(GTK_OBJECT(child), "itemdata"); retval = treeselectfunc(work->window, child, text, itemdata, work->data); } return retval; @@ -4370,7 +4370,8 @@ gdk_imlib_destroy_image(image); } #else - _PixmapArray[found].pixmap = gdk_pixmap_create_from_xpm(last_window->window, &_PixmapArray[found].mask, &_colors[DW_CLR_PALEGRAY], file); + if (last_window) + _PixmapArray[found].pixmap = gdk_pixmap_create_from_xpm(last_window->window, &_PixmapArray[found].mask, &_colors[DW_CLR_PALEGRAY], file); #endif DW_MUTEX_UNLOCK; if(!_PixmapArray[found].pixmap || !_PixmapArray[found].mask)