[nemiver/gtk2-branch] Fix a crash in previous commit



commit cd12938263a135e17c514ccb9dbf57c0403e85e5
Author: Dodji Seketeli <dodji seketeli org>
Date:   Mon Apr 4 16:50:39 2011 +0200

    Fix a crash in previous commit
    
    	* src/confmgr/nmv-gsettings-mgr.cc
    	(GSettingsMgr::register_namespace): Bind the namespace name
    	to the parameter of the signal handler by value; not by
    	reference.  This avoids a crash when the signal slots later try to
    	poke at the namespace parameter.
    	(GSettingsMgr::set_key_value): Fix thinko.

 src/confmgr/nmv-gsettings-mgr.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/confmgr/nmv-gsettings-mgr.cc b/src/confmgr/nmv-gsettings-mgr.cc
index ca664c4..83d242a 100644
--- a/src/confmgr/nmv-gsettings-mgr.cc
+++ b/src/confmgr/nmv-gsettings-mgr.cc
@@ -123,7 +123,7 @@ GSettingsMgr::register_namespace (const UString &a_name)
         Gio::Settings::create (name);
     THROW_IF_FAIL (settings);
 
-    settings->signal_changed ().connect (sigc::bind<const UString&> (
+    settings->signal_changed ().connect (sigc::bind<const UString> (
         sigc::mem_fun (m_value_changed_signal,
                        &sigc::signal<void,
                        const UString&,
@@ -220,7 +220,7 @@ GSettingsMgr::set_key_value (const UString &a_key,
     UString ns = a_namespace;
     ENSURE_NAMESPACE_NOT_EMPTY (ns);
 
-    Glib::RefPtr<Gio::Settings> settings = m_settings[a_namespace];
+    Glib::RefPtr<Gio::Settings> settings = m_settings[ns];
     THROW_IF_FAIL (settings);
 
     settings->set_int (a_key, a_value);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]