[evince] [libdocument] Check for NULL in synctex_backward_search.
- From: Jose Aliste <jaliste src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] [libdocument] Check for NULL in synctex_backward_search.
- Date: Thu, 30 Sep 2010 15:34:20 +0000 (UTC)
commit 26c3b7e6b2fb3ee2d01ec249f7026a37bcfc2f9c
Author: José Aliste <jaliste src gnome org>
Date: Wed Sep 29 12:22:32 2010 -0400
[libdocument] Check for NULL in synctex_backward_search.
Fixes bug #630845
libdocument/ev-document.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/libdocument/ev-document.c b/libdocument/ev-document.c
index d7ee2c1..78fb8a0 100644
--- a/libdocument/ev-document.c
+++ b/libdocument/ev-document.c
@@ -420,11 +420,16 @@ ev_document_synctex_backward_search (EvDocument *document,
/* We assume that a backward search returns either zero or one result_node */
node = synctex_next_result (scanner);
if (node != NULL) {
- result = g_new (EvSourceLink, 1);
- result->filename = synctex_scanner_get_name (scanner,
- synctex_node_tag (node));
- result->line = synctex_node_line (node);
- result->col = synctex_node_column (node);
+ const gchar *filename;
+
+ filename = synctex_scanner_get_name (scanner, synctex_node_tag (node));
+
+ if (filename) {
+ result = g_new (EvSourceLink, 1);
+ result->filename = filename;
+ result->line = synctex_node_line (node);
+ result->col = synctex_node_column (node);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]