diff options
author | Piiit <[email protected]> | 2017-06-19 12:48:32 +0200 |
---|---|---|
committer | monsta <[email protected]> | 2018-04-03 16:42:05 +0300 |
commit | 370cea480023260dfa0d2fe6b8d8ed93249264d9 (patch) | |
tree | 5d9b6002d86aaaa137134d56596d825af3e66676 | |
parent | f88b6466e466d5900c200490bda63639c521a436 (diff) | |
download | atril-370cea480023260dfa0d2fe6b8d8ed93249264d9.tar.bz2 atril-370cea480023260dfa0d2fe6b8d8ed93249264d9.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
-rw-r--r-- | libview/ev-web-view.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) { |