You've already forked lazarus-ccr
tvplanit: Fix fulldemo with resource groups crashing due to nil resources.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5161 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -819,6 +819,7 @@ var
|
||||
i: Integer;
|
||||
event: TVpEvent;
|
||||
id: Integer;
|
||||
res: TVpResource;
|
||||
begin
|
||||
Resource.Schedule.ClearGroupEvents;
|
||||
|
||||
@ -828,11 +829,17 @@ begin
|
||||
end;
|
||||
|
||||
for i:=0 to Resource.Group.Count-1 do begin
|
||||
id := Resource.Group[i].ResourceID;
|
||||
// current resource of group
|
||||
res := Resource.Group[i];
|
||||
if res <> nil then begin
|
||||
id := res.ResourceID;
|
||||
// Ignore active resource in group
|
||||
if id = ResourceID then
|
||||
exit;
|
||||
Continue;
|
||||
// Load events of the current resource of the group
|
||||
LoadEventsOfResource(id);
|
||||
end;
|
||||
end;
|
||||
|
||||
NotifyDependents;
|
||||
end;
|
||||
|
@ -752,6 +752,7 @@ begin
|
||||
if ACaption = '' then begin
|
||||
for i:=Low(AResIDs) + 1 to High(AResIDs) do begin
|
||||
res := GetResource(AResIDs[i]);
|
||||
if res <> nil then
|
||||
ACaption := ACaption + ', ' + res.Description;
|
||||
end;
|
||||
if ACaption <> '' then Delete(ACaption, 1, 2);
|
||||
|
Reference in New Issue
Block a user