From e27e614cbd30a919aa8ea772df056fd2f8f4f78a Mon Sep 17 00:00:00 2001 From: tombo Date: Sat, 28 Jun 2008 13:30:28 +0000 Subject: [PATCH] LCL imagelist: fixed range check error when editing empty image list git-svn-id: trunk@15604 - --- lcl/include/imglist.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcl/include/imglist.inc b/lcl/include/imglist.inc index ba9e0f85e4..aea0214578 100644 --- a/lcl/include/imglist.inc +++ b/lcl/include/imglist.inc @@ -96,7 +96,7 @@ var DataSize: Integer; OldCount: Integer; begin - if (AValue = nil) or (AValue=Self) then exit; + if (AValue = nil) or (AValue=Self) or (AValue.FCount = 0) then exit; AllocData(FCount + AValue.FCount); if (AValue.FWidth = FWidth) and (AValue.FHeight = FHeight)