rxdbgrid - fix AV on open form whith empty grid

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2516 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2012-09-18 16:29:12 +00:00
parent 7939e193c6
commit 8fb214f590

View File

@ -2330,7 +2330,7 @@ begin
begin
F := GetFieldFromGridColumn(aCol);
C := ColumnFromGridColumn(aCol) as TRxColumn;
if Assigned(C.FOnDrawColumnCell) then
if Assigned(C) and Assigned(C.FOnDrawColumnCell) then
C.OnDrawColumnCell(Self, aRect, aCol, TColumn(ColumnFromGridColumn(aCol)), aState)
else
begin