mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-01 02:36:00 +01:00
remove duplicated code
This commit is contained in:
parent
4d7de4bb9f
commit
f7e9c3d770
1 changed files with 3 additions and 9 deletions
12
document.c
12
document.c
|
@ -291,19 +291,13 @@ zathura_document_free(zathura_document_t* document)
|
||||||
free(document->pages);
|
free(document->pages);
|
||||||
|
|
||||||
/* free document */
|
/* free document */
|
||||||
|
bool r = true;
|
||||||
if (document->functions.document_free == NULL) {
|
if (document->functions.document_free == NULL) {
|
||||||
girara_error("%s not implemented", __FUNCTION__);
|
girara_error("%s not implemented", __FUNCTION__);
|
||||||
|
} else {
|
||||||
if (document->file_path != NULL) {
|
r = document->functions.document_free(document);
|
||||||
free(document->file_path);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free(document);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool r = document->functions.document_free(document);
|
|
||||||
|
|
||||||
if (document->file_path != NULL) {
|
if (document->file_path != NULL) {
|
||||||
free(document->file_path);
|
free(document->file_path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue