From e51014b5a0b2750df5ccfe98696227c949c93c28 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(+) (limited to 'libview/ev-web-view.c') 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) { -- cgit v1.2.1