LazMapViewer: Fix potential crash when setting the PluginManager for the MapView (part of issue #39092, patch by @iluha.companets)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9622 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
8959750876
commit
ad7d4dea27
@ -2686,10 +2686,13 @@ procedure TMapView.SetPluginManager(AValue: TMvCustomPluginManager);
|
||||
begin
|
||||
if FPluginManager = AValue then
|
||||
exit;
|
||||
|
||||
if FPluginManager <> nil then
|
||||
begin
|
||||
RemoveFreeNotification(FPluginManager);
|
||||
if AValue = nil then
|
||||
FPlugInManager.RemoveMapView(Self);
|
||||
if AValue = nil then
|
||||
FPlugInManager.RemoveMapView(Self);
|
||||
end;
|
||||
|
||||
FPluginManager := AValue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user