From 6776c7642352f1e7cc71c8c69b7ee0ce850196b8 Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 19 Jan 2012 21:11:52 +0000 Subject: [PATCH] LCL: TRawImage.PerformEffect: first check description then allocate mem git-svn-id: trunk@34801 - --- lcl/graphtype.pp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lcl/graphtype.pp b/lcl/graphtype.pp index 157de69184..d5501e7a5d 100644 --- a/lcl/graphtype.pp +++ b/lcl/graphtype.pp @@ -1631,6 +1631,10 @@ var P: Pointer; i, j: integer; begin + // check here for Description. Only RGBA data can be processed here. + if not CheckDescription then + Exit; + if CreateNewData then begin GetMem(AData, DataSize); @@ -1643,11 +1647,6 @@ begin AData := P; end; - // check here for Description. Only RGBA data can be processed here. - if not CheckDescription then - Exit; - - case ADrawEffect of gdeNormal: ; gdeDisabled: