[gnome-documents/wip/lokdocview-rebase: 11/14] Avoid backtrace when	LOK isn't available
- From: Debarshi Ray <debarshir src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-documents/wip/lokdocview-rebase: 11/14] Avoid backtrace when	LOK isn't available
 
- Date: Mon,  4 Jan 2016 17:24:29 +0000 (UTC)
 
commit 2f794b611cd875ccb7a9e4e84235d71f2031bc7e
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Dec 7 12:10:34 2015 +0100
    Avoid backtrace when LOK isn't available
    
    The error was already showing up, but a backtrace as well.
 src/lokview.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/lokview.js b/src/lokview.js
index 49fb4f8..f429fd0 100644
--- a/src/lokview.js
+++ b/src/lokview.js
@@ -144,6 +144,8 @@ const LOKView = new Lang.Class({
     _onLoadStarted: function(manager, doc) {
         if (doc.viewType != Documents.ViewType.LOK)
             return;
+        if (!isAvailable())
+            return;
         let file = Gio.File.new_for_uri (doc.uri);
         let location = file.get_path();
         this._doc = doc;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]