Explorar o código

* Avoid AV acessing page if band not assigned

git-svn-id: trunk@38930 -
michael %!s(int64=7) %!d(string=hai) anos
pai
achega
75e4be46f9
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      packages/fcl-report/src/fpreport.pp

+ 4 - 1
packages/fcl-report/src/fpreport.pp

@@ -6940,7 +6940,10 @@ end;
 
 function TFPReportElement.GetReportPage: TFPReportCustomPage;
 begin
-  Result := Band.Page;
+  if Assigned(Band) then
+    Result := Band.Page
+  else
+    Result:=Nil;
 end;
 
 procedure TFPReportElement.SaveDataToNames;