[gnome-documents] application: Don't unexport a skeleton that was never exported



commit eb398d56a522da6f1da4ea9b9e9866f548834144
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jun 8 16:58:08 2017 +0200

    application: Don't unexport a skeleton that was never exported
    
    Otherwise it will again lead to:
      GLib-GIO-CRITICAL **:
        g_dbus_interface_skeleton_unexport_from_connection: assertion
        'interface_->priv->connections != NULL' failed
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783548

 src/application.js |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index e5a8be0..b8731a2 100644
--- a/src/application.js
+++ b/src/application.js
@@ -452,7 +452,13 @@ const Application = new Lang.Class({
         this._searchProvider.connect('activate-result', Lang.bind(this, this._onActivateResult));
         this._searchProvider.connect('launch-search', Lang.bind(this, this._onLaunchSearch));
 
-        this._searchProvider.export(connection);
+        try {
+            this._searchProvider.export(connection);
+        } catch(e) {
+            this._searchProvider = null;
+            throw(e);
+        }
+
         return true;
     },
 


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