From 370cea480023260dfa0d2fe6b8d8ed93249264d9 Mon Sep 17 00:00:00 2001 From: Piiit Date: Mon, 19 Jun 2017 12:48:32 +0200 Subject: 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 --- libview/ev-web-view.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libview/ev-web-view.c b/libview/ev-web-view.c index 6e302660..fa0ff009 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) { -- cgit v1.2.1