summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
authorPiiit <[email protected]>2017-06-19 12:48:32 +0200
committerraveit65 <[email protected]>2018-03-19 09:43:04 +0100
commite4f8fce9875ce749ada754538a089415a23ce440 (patch)
tree3a17b7ed19123f260813627a74dca5abf69c433e /libview
parent6217a89c6fad8ab77d3776210df5f6a182928f0e (diff)
downloadatril-e4f8fce9875ce749ada754538a089415a23ce440.tar.bz2
atril-e4f8fce9875ce749ada754538a089415a23ce440.tar.xz
libview: save inverted colors in a document
The web-view callback for inverted colors got called, and if it did not find a web-view open it defaulted to FALSE for inverted colors. origin commit: https://github.com/linuxmint/xreader/commit/abb5060 https://github.com/linuxmint/xreader/issues/38
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-web-view.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libview/ev-web-view.c b/libview/ev-web-view.c
index 5a101f6b..782e4ea4 100644
--- a/libview/ev-web-view.c
+++ b/libview/ev-web-view.c
@@ -252,6 +252,9 @@ ev_web_view_inverted_colors_changed_cb (EvDocumentModel *model,
EvWebView *webview)
{
EvDocument *document = ev_document_model_get_document(model);
+
+ if (!document || !document->iswebdocument)
+ return;
if (ev_document_model_get_inverted_colors(model) == TRUE) {
if (document == NULL) {