Fixed GDI heap selector handling broken by previous change.

This commit is contained in:
Alexandre Julliard 2002-10-02 23:47:14 +00:00
parent 0d3b4906e4
commit c401270d60
1 changed files with 3 additions and 2 deletions

View File

@ -125,10 +125,11 @@ static HPEN SysColorPens[NUM_SYS_COLORS];
*/
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);