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



commit 9f6069c718a7e761d4a7a5acbe9af7e0762adccc
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 02dc1be..ba44d0f 100644
--- a/src/application.js
+++ b/src/application.js
@@ -448,7 +448,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]