fpspreadsheet: Fix crash when WorksheetGrid with assigned WorkbookSource is used in a frame (see http://www.lazarusforum.de/viewtopic.php?f=18&t=10428)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5684 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-01-21 21:39:20 +00:00
parent 0551194295
commit 2200c4879e

View File

@ -4574,11 +4574,10 @@ begin
if FLockSetup > 0 then
exit;
{
if not HandleAllocated then
//Avoid crash when accessing the canvas, e.g. in GetDefaultHeaderColWidth
exit;
}
if (Worksheet = nil) or (Worksheet.GetCellCount = 0) then begin
FixedCols := FFrozenCols + FHeaderCount;