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
|
begin
|
||||||
if FPluginManager = AValue then
|
if FPluginManager = AValue then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
if FPluginManager <> nil then
|
if FPluginManager <> nil then
|
||||||
|
begin
|
||||||
RemoveFreeNotification(FPluginManager);
|
RemoveFreeNotification(FPluginManager);
|
||||||
if AValue = nil then
|
if AValue = nil then
|
||||||
FPlugInManager.RemoveMapView(Self);
|
FPlugInManager.RemoveMapView(Self);
|
||||||
|
end;
|
||||||
|
|
||||||
FPluginManager := AValue;
|
FPluginManager := AValue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user