changeset 1716:b39c137cc6f5

Only use the ID on OS/2 in dw_window_set_bitmap_from_file() if the data is NULL.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 08 May 2012 17:34:36 +0000
parents e6b139e0b64d
children 8228b3cf8f37
files os2/dw.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/os2/dw.c	Tue May 08 17:14:40 2012 +0000
+++ b/os2/dw.c	Tue May 08 17:34:36 2012 +0000
@@ -7055,13 +7055,7 @@
    /* Destroy any old bitmap data */
    _free_bitmap(handle);
 
-   /* If id is non-zero use the resource */
-   if ( id )
-   {
-      hps = WinGetPS( handle );
-      hbm = GpiLoadBitmap( hps, NULLHANDLE, id, 0, 0 );
-   }
-   else if ( data )
+   if ( data )
    {
       file = tmpnam( NULL );
       if ( file != NULL )
@@ -7091,6 +7085,12 @@
       dw_window_set_data(handle, "_dw_width", (void *)width);
       dw_window_set_data(handle, "_dw_height", (void *)height);
    }
+   /* If id is non-zero use the resource */
+   else if ( id )
+   {
+      hps = WinGetPS( handle );
+      hbm = GpiLoadBitmap( hps, NULLHANDLE, id, 0, 0 );
+   }
    else
       return;