From 47f9fe94de8a65ffa71fc8514ba636d9b3e0e0bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Hugues?= Date: Sat, 5 Mar 2005 14:28:03 +0000 Subject: [PATCH] (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 --- src/polyorb-smart_pointers.adb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/polyorb-smart_pointers.adb b/src/polyorb-smart_pointers.adb index ceddfa2a1..4abc6a66d 100644 --- a/src/polyorb-smart_pointers.adb +++ b/src/polyorb-smart_pointers.adb @@ -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 ")); + null; + end if; if The_Ref.A_Ref /= null then Dec_Usage (The_Ref.A_Ref);