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) {