summaryrefslogtreecommitdiff
path: root/libview/ev-web-view.c
diff options
context:
space:
mode:
authorPiiit <[email protected]>2017-06-19 12:48:32 +0200
committerraveit65 <[email protected]>2018-03-19 09:39:06 +0100
commite51014b5a0b2750df5ccfe98696227c949c93c28 (patch)
tree4d2d90752cd2f7e4e740e9c6d4be8e34bf55438c /libview/ev-web-view.c
parent4bb14f5ff09c47f37a17b8b128c691878b8b1c4c (diff)
downloadatril-e51014b5a0b2750df5ccfe98696227c949c93c28.tar.bz2
atril-e51014b5a0b2750df5ccfe98696227c949c93c28.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/ev-web-view.c')
-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) {