don't fail in :close if nothing is open

This commit is contained in:
Sebastian Ramacher 2011-08-30 23:40:13 +02:00
parent caccb94c69
commit e349eddd9d

View File

@ -28,7 +28,10 @@ cmd_close(girara_session_t* session, girara_list_t* argument_list)
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
g_return_val_if_fail(zathura->document != NULL, false);
if (zathura->document == NULL) {
// nothing needs to be done
return true;
}
document_close(zathura);