Fixed GDI heap selector handling broken by previous change.
diff --git a/windows/syscolor.c b/windows/syscolor.c
index ce8a302..34c6841 100644
--- a/windows/syscolor.c
+++ b/windows/syscolor.c
@@ -125,10 +125,11 @@
*/
static void SYSCOLOR_MakeObjectSystem( HGDIOBJ handle, BOOL set)
{
- WORD heap_sel;
+ static WORD heap_sel = 0;
LPWORD ptr;
- if ((heap_sel = GetModuleHandle16( "gdi" )))
+ if (!heap_sel) heap_sel = LoadLibrary16( "gdi" );
+ if (heap_sel >= 32)
{
ptr = (LPWORD)LOCAL_Lock(heap_sel, handle);