mirror of
https://github.com/AdaCore/PolyORB.git
synced 2026-02-12 13:01:15 -08:00
(Finalize): check Ref_External_Tag is not null before
dereferencing it. Patch submitted by Vadim Godunko, reviewed by Jerome Hugues. [Imported from Perforce change 9177 at 2006-12-01 21:16:23] Subversion-branch: /trunk/polyorb Subversion-revision: 36695
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 2001-2004 Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 2001-2005 Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- PolyORB is free software; you can redistribute it and/or modify it --
|
||||
-- under terms of the GNU General Public License as published by the Free --
|
||||
@@ -26,8 +26,8 @@
|
||||
-- however invalidate any other reasons why the executable file might be --
|
||||
-- covered by the GNU Public License. --
|
||||
-- --
|
||||
-- PolyORB is maintained by ACT Europe. --
|
||||
-- (email: sales@act-europe.fr) --
|
||||
-- PolyORB is maintained by AdaCore --
|
||||
-- (email: sales@adacore.com) --
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@@ -198,8 +198,14 @@ package body PolyORB.Smart_Pointers is
|
||||
procedure Finalize
|
||||
(The_Ref : in out Ref) is
|
||||
begin
|
||||
pragma Debug (O ("Finalize: enter, The_Ref is a "
|
||||
& Ref_External_Tag (The_Ref)));
|
||||
if Ref_External_Tag /= null then
|
||||
pragma Debug (O ("Finalize: enter, The_Ref is a "
|
||||
& Ref_External_Tag (The_Ref)));
|
||||
null;
|
||||
else
|
||||
pragma Debug (O ("Finalize: enter, The_Ref is a <UNAVAILABLE>"));
|
||||
null;
|
||||
end if;
|
||||
|
||||
if The_Ref.A_Ref /= null then
|
||||
Dec_Usage (The_Ref.A_Ref);
|
||||
|
||||
Reference in New Issue
Block a user