summaryrefslogtreecommitdiff
path: root/libdocument/ev-document.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdocument/ev-document.c')
-rw-r--r--libdocument/ev-document.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/libdocument/ev-document.c b/libdocument/ev-document.c
index fc45830d..b2c5ab41 100644
--- a/libdocument/ev-document.c
+++ b/libdocument/ev-document.c
@@ -435,11 +435,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);
+ }
}
}
@@ -905,4 +910,4 @@ ev_document_check_add_night_sheet(EvDocument *document)
{
EvDocumentClass *klass = EV_DOCUMENT_GET_CLASS(document);
return klass->check_add_night_sheet(document) ;
-} \ No newline at end of file
+}