Commit 06205940 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Do not call HighlightRects if there was no usable output from synctex view

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 950a52b6
......@@ -110,7 +110,7 @@ main(int argc, char* argv[])
free(real_path);
return 0;
} else {
girara_error("Could not find open instance for '%s'", real_path);
girara_error("Could not find open instance for '%s' or got no usable output from 'synctex view'.", real_path);
free(real_path);
return -1;
}
......
/* See LICENSE file for license and copyright information */
#include <glib.h>
#include <girara/utils.h>
#include "synctex.h"
#include "zathura.h"
......@@ -259,6 +260,13 @@ synctex_rectangles_from_position(const char* filename, const char* position,
g_scanner_destroy(scanner);
close(output);
if (ret == false) {
girara_debug("Got no usable output from running synctex view.");
girara_list_free(hitlist);
girara_list_free(other_rects);
return NULL;
}
if (page != NULL) {
*page = rpage;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment