Fix use of uninitialized variable in dlls/user32/static.c

Gerald Pfeifer gerald at pfeifer.com
Wed Dec 30 01:47:24 CST 2009


It looks like this was introduced by 
  b96ab35cadc5c79825b65ca2c3e6f6a763388fb5

Gerald

ChangeLog:
Avoid use of uninitialized variable in STATIC_LoadIconA().

diff --git a/dlls/user32/static.c b/dlls/user32/static.c
index 5386c84..c351689 100644
--- a/dlls/user32/static.c
+++ b/dlls/user32/static.c
@@ -270,6 +270,9 @@ static HICON STATIC_LoadIconA( HINSTANCE hInstance, LPCSTR name, DWORD style )
             if (!hicon) hicon = LoadCursorA( hInstance, name );
         }
     }
+    else
+        hicon = 0;
+
     if (!hicon) hicon = LoadIconA( 0, name );
     /* Windows doesn't try to load a standard cursor,
        probably because most IDs for standard cursors conflict



More information about the wine-patches mailing list