Mercurial > dwindows
changeset 1508:9b2600034473
Safety check in _lookup_icon() on Windows to make sure we don't try to add an invalid icon handle to the image list.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 27 Dec 2011 10:47:38 +0000 |
parents | fbe9028af341 |
children | 02bfae9fd3e7 |
files | win/dw.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/win/dw.c Tue Dec 27 00:15:51 2011 +0000 +++ b/win/dw.c Tue Dec 27 10:47:38 2011 +0000 @@ -8305,6 +8305,10 @@ int z; static HWND lasthwnd = NULL; + /* We can't add an invalid handle */ + if(!hicon) + return -1; + if(!hSmall || !hLarge) { hSmall = ImageList_Create(16, 16, ILC_COLOR16 | ILC_MASK, ICON_INDEX_LIMIT, 0);