remove duplicated code

This commit is contained in:
Sebastian Ramacher 2011-10-21 23:40:16 +02:00
parent 4d7de4bb9f
commit f7e9c3d770

View file

@ -291,19 +291,13 @@ zathura_document_free(zathura_document_t* document)
free(document->pages);
/* free document */
bool r = true;
if (document->functions.document_free == NULL) {
girara_error("%s not implemented", __FUNCTION__);
if (document->file_path != NULL) {
free(document->file_path);
}
g_free(document);
return true;
} else {
r = document->functions.document_free(document);
}
bool r = document->functions.document_free(document);
if (document->file_path != NULL) {
free(document->file_path);
}