diff options
author | Monsta <[email protected]> | 2015-01-21 14:11:43 +0300 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2015-01-22 09:04:53 +0100 |
commit | 11f582cafc8abca5990135a0fe786a4bfe6f7a2a (patch) | |
tree | 3da753d8e52df8c5357b180bc7a9c6379874c14c | |
parent | d8d4fcd1182e4295cb4307333a4af4ea3e3c75db (diff) | |
download | atril-11f582cafc8abca5990135a0fe786a4bfe6f7a2a.tar.bz2 atril-11f582cafc8abca5990135a0fe786a4bfe6f7a2a.tar.xz |
fix crash when pressing Enter on "unable to open document" screen
Closes https://github.com/mate-desktop/atril/pull/124
-rw-r--r-- | shell/ev-window.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index d6b3ef7e..531b54cb 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -3778,8 +3778,9 @@ ev_window_cmd_focus_page_selector (GtkAction *act, EvWindow *window) static void ev_window_cmd_scroll_forward (GtkAction *action, EvWindow *window) { - /*If the webview is occupying the window*/ - if ( window->priv->document->iswebdocument == TRUE) return ; + /* If the webview is occupying the window */ + if (window->priv->document && window->priv->document->iswebdocument == TRUE) + return; ev_view_scroll (EV_VIEW (window->priv->view), GTK_SCROLL_PAGE_FORWARD, FALSE); } @@ -3787,8 +3788,9 @@ ev_window_cmd_scroll_forward (GtkAction *action, EvWindow *window) static void ev_window_cmd_scroll_backward (GtkAction *action, EvWindow *window) { - /*If the webview is occupying the window*/ - if ( window->priv->document->iswebdocument == TRUE ) return ; + /* If the webview is occupying the window */ + if (window->priv->document && window->priv->document->iswebdocument == TRUE) + return; ev_view_scroll (EV_VIEW (window->priv->view), GTK_SCROLL_PAGE_BACKWARD, FALSE); } |