[PATCH 1/2] comctl32/toolbar: Don't add NULL imagelist entries

Nikolay Sivov nsivov at codeweavers.com
Tue May 30 21:56:38 CDT 2017


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/comctl32/toolbar.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index c57707bcab..4da3008d5c 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -6904,6 +6904,10 @@ static HIMAGELIST TOOLBAR_InsertImageList(PIMLENTRY **pies, INT *cies, HIMAGELIS
     /* Check if the entry already exists */
     c = TOOLBAR_GetImageListEntry(*pies, *cies, id);
 
+    /* Don't add new entry for NULL imagelist */
+    if (!c && !himl)
+        return NULL;
+
     /* If this is a new entry we must create it and insert into the array */
     if (!c)
     {
-- 
2.11.0




More information about the wine-patches mailing list