mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-01 08:36:00 +01:00
some error checking for zathura_page_get
This commit is contained in:
parent
65d2241e06
commit
0767aa85bf
1 changed files with 6 additions and 0 deletions
|
@ -513,6 +513,12 @@ zathura_page_get(zathura_document_t* document, unsigned int page_id, zathura_plu
|
||||||
page->number = page_id;
|
page->number = page_id;
|
||||||
page->visible = false;
|
page->visible = false;
|
||||||
page->drawing_area = zathura_page_widget_new(page);
|
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;
|
page->document = document;
|
||||||
|
|
||||||
unsigned int page_height = 0;
|
unsigned int page_height = 0;
|
||||||
|
|
Loading…
Reference in a new issue