[evince/1120-gnome-3-32-evince-crashed] ev_window: prevent NULL metadata being passed
- From: Nelson Benítez León <nbenitez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/1120-gnome-3-32-evince-crashed] ev_window: prevent NULL metadata being passed
- Date: Thu, 18 Apr 2019 21:09:16 +0000 (UTC)
commit 5197ad062f3c556fe20b985295ea2de68c16b1a0
Author: Nelson Benítez León <nbenitezl gmail com>
Date: Fri Mar 29 23:10:29 2019 -0400
ev_window: prevent NULL metadata being passed
to ev_metadata_get_int() function inside
ev_window_get_metadata_sidebar_size().
This could happen if the pdf file returned
false for ev_is_metadata_supported_for_file()
Fixes issue #1120
shell/ev-window.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 21bb599b..6f271e55 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -7863,6 +7863,9 @@ ev_window_get_metadata_sidebar_size (EvWindow *ev_window)
priv = GET_PRIVATE (ev_window);
+ if (!priv->metadata)
+ return 0;
+
if (ev_metadata_get_int (priv->metadata, "sidebar_size", &sidebar_size))
return sidebar_size;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]