mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 17:53:45 +01:00
Do not call HighlightRects if there was no usable output from synctex view
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
950a52b612
commit
06205940bb
2
main.c
2
main.c
@ -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;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user