diff --git a/lcl/include/menuitem.inc b/lcl/include/menuitem.inc index e716651c30..ec06da0d32 100644 --- a/lcl/include/menuitem.inc +++ b/lcl/include/menuitem.inc @@ -1462,7 +1462,7 @@ procedure TMenuItem.UpdateImage(forced: Boolean); var ImgList: TCustomImageList; begin - if HandleAllocated and ([csLoading, csDestroying] * ComponentState = []) then + if [csLoading, csDestroying] * ComponentState = [] then begin ImgList := GetImageList; if FBitmapIsValid then // Bitmap is assigned through Bitmap property @@ -1481,7 +1481,8 @@ begin FBitmapIsValid := True; end; end; - UpdateWSIcon; + if HandleAllocated then + UpdateWSIcon; end; end;