mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-13 08:23:46 +01:00
return even earlier
This commit is contained in:
parent
721d566881
commit
843a0513e2
@ -147,6 +147,10 @@ error_free:
|
|||||||
girara_completion_t*
|
girara_completion_t*
|
||||||
cc_bookmarks(girara_session_t* session, const char* input)
|
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 != NULL, NULL);
|
||||||
g_return_val_if_fail(session->global.data != NULL, NULL);
|
g_return_val_if_fail(session->global.data != NULL, NULL);
|
||||||
zathura_t* zathura = session->global.data;
|
zathura_t* zathura = session->global.data;
|
||||||
@ -158,10 +162,6 @@ cc_bookmarks(girara_session_t* session, const char* input)
|
|||||||
goto error_free;
|
goto error_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!input) {
|
|
||||||
goto error_free;
|
|
||||||
}
|
|
||||||
|
|
||||||
const size_t input_length = strlen(input);
|
const size_t input_length = strlen(input);
|
||||||
GIRARA_LIST_FOREACH(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark)
|
GIRARA_LIST_FOREACH(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark)
|
||||||
if (input_length <= strlen(bookmark->id) && !strncmp(input, bookmark->id, input_length)) {
|
if (input_length <= strlen(bookmark->id) && !strncmp(input, bookmark->id, input_length)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user