From 0767aa85bfe3f55cf9ff36b05467fe942fa463cb Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Thu, 16 Feb 2012 15:47:33 +0100 Subject: [PATCH] some error checking for zathura_page_get --- document.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/document.c b/document.c index 240b6e2..5c67d8f 100644 --- a/document.c +++ b/document.c @@ -513,6 +513,12 @@ zathura_page_get(zathura_document_t* document, unsigned int page_id, zathura_plu page->number = page_id; page->visible = false; page->drawing_area = zathura_page_widget_new(page); + if (page->drawing_area == NULL) { + girara_error("couldn't create page widget"); + zathura_page_free(page); + return NULL; + } + page->document = document; unsigned int page_height = 0;