From 57f3ed2984b6fce4c3624006e1650e6ddb17bfcf Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Tue, 30 Jan 2007 09:31:20 +0000 Subject: [PATCH] Bug 240320. Prevent exception when GNOME_KEYRING_SOCKET is not set. --- CASA/CASA.changes | 5 +++++ CASA/adlib/GKEngine.cs | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CASA/CASA.changes b/CASA/CASA.changes index e9e83658..c6e5c6a7 100644 --- a/CASA/CASA.changes +++ b/CASA/CASA.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 30 14:12:02 MST 2007 - jnorman@novell.com + +- Bug 240320. Prevent native exception when exiting CASAManager. + ------------------------------------------------------------------- Tue Jan 30 11:40:17 MST 2007 - jnorman@novell.com diff --git a/CASA/adlib/GKEngine.cs b/CASA/adlib/GKEngine.cs index c04505e8..f042f2c3 100644 --- a/CASA/adlib/GKEngine.cs +++ b/CASA/adlib/GKEngine.cs @@ -56,7 +56,12 @@ namespace Novell.CASA.DataEngines ~GKEngine() { - GnomeKeyring.ReleaseGnomeKeyringLib(); + + string sIsSocketDefined = Environment.GetEnvironmentVariable("GNOME_KEYRING_SOCKET"); + if ((sIsSocketDefined != null) && (sIsSocketDefined.Length > 0)) + { + GnomeKeyring.ReleaseGnomeKeyringLib(); + } } public XmlNode Aggregate()