From 10b500682891a25e36774caf547cc3a2fc87f070 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Fri, 13 Jan 2012 17:33:19 +0100 Subject: [PATCH] reset scale if it is negative --- document.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/document.c b/document.c index 4978e12..330db2a 100644 --- a/document.c +++ b/document.c @@ -262,6 +262,11 @@ zathura_document_open(zathura_t* zathura, const char* path, const char* password int offset = 0; zathura_db_get_fileinfo(zathura->database, document->file_path, &document->current_page_number, &offset, &document->scale); + if (document->scale <= 0) + { + girara_warning("document info: '%s' has non positive scale", document->file_path); + document->scale = 1; + } if (plugin->open_function != NULL) { if (plugin->open_function(document) == true) {