changeset 1718:fae374a0055b

Same fix for GTK2/3 as committed for OS/2 and Windows... Not sure why I did it that way at all in the first place.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 08 May 2012 18:28:39 +0000
parents 8228b3cf8f37
children 032c3388dda6
files gtk/dw.c gtk3/dw.c
diffstat 2 files changed, 7 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/dw.c	Tue May 08 18:14:48 2012 +0000
+++ b/gtk/dw.c	Tue May 08 18:28:39 2012 +0000
@@ -4992,20 +4992,13 @@
       return;
 
    DW_MUTEX_LOCK;
-   if (id)
-      tmp = _find_pixmap(&bitmap, (HICN)id, handle, NULL, NULL);
-   else
+   if(data)
    {
 #if GTK_MAJOR_VERSION > 1
       GdkPixbuf *pixbuf;
 #elif defined(USE_IMLIB)
       GdkImlibImage *image;
 #endif
-      if (!data)
-      {
-         DW_MUTEX_UNLOCK;
-         return;
-      }
       /*
        * A real hack; create a temporary file and write the contents
        * of the data to the file
@@ -5038,6 +5031,8 @@
       /* remove our temporary file */
       unlink (file );
    }
+   else if (id)
+      tmp = _find_pixmap(&bitmap, (HICN)id, handle, NULL, NULL);
 
    if(tmp)
    {
--- a/gtk3/dw.c	Tue May 08 18:14:48 2012 +0000
+++ b/gtk3/dw.c	Tue May 08 18:28:39 2012 +0000
@@ -4304,15 +4304,8 @@
       return;
 
    DW_MUTEX_LOCK;
-   if (id)
-      tmp = _find_pixbuf((HICN)id, NULL, NULL);
-   else
-   {
-      if (!data)
-      {
-         DW_MUTEX_UNLOCK;
-         return;
-      }
+   if(data)
+   {
       /*
        * A real hack; create a temporary file and write the contents
        * of the data to the file
@@ -4333,6 +4326,8 @@
       /* remove our temporary file */
       unlink (file );
    }
+   else if (id)
+      tmp = _find_pixbuf((HICN)id, NULL, NULL);
 
    if(tmp)
    {