comparison gtk/dw.c @ 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 ef34ebf8b7cb
children 324587c06cea
comparison
equal deleted inserted replaced
295:aac3ab26d636 296:d2392cf845e4
512 512
513 if(work) 513 if(work)
514 { 514 {
515 int (*treeselectfunc)(HWND, HWND, char *, void *, void *) = work->func; 515 int (*treeselectfunc)(HWND, HWND, char *, void *, void *) = work->func;
516 char *text = (char *)gtk_object_get_data(GTK_OBJECT(child), "text"); 516 char *text = (char *)gtk_object_get_data(GTK_OBJECT(child), "text");
517 void *itemdata = (char *)gtk_object_get_data(GTK_OBJECT(child), "itemdata"); 517 void *itemdata = (void *)gtk_object_get_data(GTK_OBJECT(child), "itemdata");
518 retval = treeselectfunc(work->window, child, text, itemdata, work->data); 518 retval = treeselectfunc(work->window, child, text, itemdata, work->data);
519 } 519 }
520 return retval; 520 return retval;
521 } 521 }
522 #endif 522 #endif
4368 _PixmapArray[found].pixmap = gdk_imlib_copy_image(image); 4368 _PixmapArray[found].pixmap = gdk_imlib_copy_image(image);
4369 _PixmapArray[found].mask = gdk_imlib_copy_mask(image); 4369 _PixmapArray[found].mask = gdk_imlib_copy_mask(image);
4370 gdk_imlib_destroy_image(image); 4370 gdk_imlib_destroy_image(image);
4371 } 4371 }
4372 #else 4372 #else
4373 _PixmapArray[found].pixmap = gdk_pixmap_create_from_xpm(last_window->window, &_PixmapArray[found].mask, &_colors[DW_CLR_PALEGRAY], file); 4373 if (last_window)
4374 _PixmapArray[found].pixmap = gdk_pixmap_create_from_xpm(last_window->window, &_PixmapArray[found].mask, &_colors[DW_CLR_PALEGRAY], file);
4374 #endif 4375 #endif
4375 DW_MUTEX_UNLOCK; 4376 DW_MUTEX_UNLOCK;
4376 if(!_PixmapArray[found].pixmap || !_PixmapArray[found].mask) 4377 if(!_PixmapArray[found].pixmap || !_PixmapArray[found].mask)
4377 { 4378 {
4378 _PixmapArray[found].used = 0; 4379 _PixmapArray[found].used = 0;