Commit 843a0513 authored by Sebastian Ramacher's avatar Sebastian Ramacher

return even earlier

parent 721d5668
......@@ -147,6 +147,10 @@ error_free:
girara_completion_t*
cc_bookmarks(girara_session_t* session, const char* input)
{
if (input == NULL) {
return NULL;
}
g_return_val_if_fail(session != NULL, NULL);
g_return_val_if_fail(session->global.data != NULL, NULL);
zathura_t* zathura = session->global.data;
......@@ -158,10 +162,6 @@ cc_bookmarks(girara_session_t* session, const char* input)
goto error_free;
}
if (!input) {
goto error_free;
}
const size_t input_length = strlen(input);
GIRARA_LIST_FOREACH(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark)
if (input_length <= strlen(bookmark->id) && !strncmp(input, bookmark->id, input_length)) {
......
Markdown is supported
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