Ignore:
Timestamp:
Jan 6, 2003, 5:15:13 PM (23 years ago)
Author:
sandervl
Message:

Fixed icon leak in IconForWindow method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r9635 r9637  
    1 /* $Id: win32wbase.cpp,v 1.352 2003-01-06 15:38:17 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.353 2003-01-06 16:15:13 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    22672267        hWndIcon = windowClass->getIcon();
    22682268    else
    2269     if (!(dwStyle & DS_MODALFRAME))
    2270          hWndIcon = LoadImageA(0,MAKEINTRESOURCEA(OIC_ODINICON),IMAGE_ICON,0,0,LR_DEFAULTCOLOR);
     2269    if (!(dwStyle & DS_MODALFRAME))
     2270    {//SvL: load it as shared or else we'll leak icons
     2271         hWndIcon = LoadImageA(0,MAKEINTRESOURCEA(OIC_ODINICON),IMAGE_ICON,0,0,LR_DEFAULTCOLOR|LR_SHARED);
     2272    }
    22712273    else hWndIcon = 0;
    22722274  }
     
    22852287        hWndIcon = windowClass->getIcon();
    22862288    else
    2287     if (!(dwStyle & DS_MODALFRAME))
    2288          hWndIcon = LoadImageA(0,MAKEINTRESOURCEA(OIC_ODINICON),IMAGE_ICON,0,0,LR_DEFAULTCOLOR);
     2289    if (!(dwStyle & DS_MODALFRAME))
     2290    {//SvL: load it as shared or else we'll leak icons
     2291         hWndIcon = LoadImageA(0,MAKEINTRESOURCEA(OIC_ODINICON),IMAGE_ICON,0,0,LR_DEFAULTCOLOR|LR_SHARED);
     2292    }
    22892293    else hWndIcon = 0;
    22902294  }
Note: See TracChangeset for help on using the changeset viewer.