Commit f7e9c3d7 authored by Sebastian Ramacher's avatar Sebastian Ramacher
Browse files

remove duplicated code

parent 4d7de4bb
......@@ -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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment