From ece34a1319f47cb7cd242c0f95d57cd1d35ae8f4 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 31 May 2017 05:56:38 +0300 Subject: [PATCH] comctl32/toolbar: Don't add NULL imagelist entries. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/comctl32/toolbar.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index c57707bcab6..4da3008d5c8 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.4.GIT