Module: wine Branch: master Commit: 9eea385a0ead738a78590bb60c1dca93ba366475 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9eea385a0ead738a78590bb60c...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Jun 8 12:45:48 2010 +0200
comctl32/imagelist: Grow the has_alpha array also in ImageList_SetImageCount.
---
dlls/comctl32/imagelist.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index e4249b9..6e445b5 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -2853,6 +2853,17 @@ ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount)
DeleteDC (hdcBitmap);
+ if (himl->has_alpha) + { + char *new_alpha = HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, himl->has_alpha, nNewCount ); + if (new_alpha) himl->has_alpha = new_alpha; + else + { + HeapFree( GetProcessHeap(), 0, himl->has_alpha ); + himl->has_alpha = NULL; + } + } + /* Update max image count and current image count */ himl->cMaxImage = nNewCount; himl->cCurImage = iImageCount;