mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-13 13:13:46 +01:00
We get an int from girara_config_get
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
ca2d279d10
commit
4b7347efa7
@ -280,11 +280,13 @@ zathura_init(zathura_t* zathura)
|
|||||||
|
|
||||||
/* page cache */
|
/* page cache */
|
||||||
|
|
||||||
zathura->page_cache.size = ZATHURA_PAGE_CACHE_DEFAULT_SIZE;
|
int cache_size = 0;
|
||||||
girara_setting_get(zathura->ui.session, "page-cache-size", &zathura->page_cache.size);
|
girara_setting_get(zathura->ui.session, "page-cache-size", &cache_size);
|
||||||
if (zathura->page_cache.size <= 0) {
|
if (cache_size <= 0) {
|
||||||
girara_warning("page-cache-size is not positive, using %d instead", ZATHURA_PAGE_CACHE_DEFAULT_SIZE);
|
girara_warning("page-cache-size is not positive, using %d instead", ZATHURA_PAGE_CACHE_DEFAULT_SIZE);
|
||||||
zathura->page_cache.size = ZATHURA_PAGE_CACHE_DEFAULT_SIZE;
|
zathura->page_cache.size = ZATHURA_PAGE_CACHE_DEFAULT_SIZE;
|
||||||
|
} else {
|
||||||
|
zathura->page_cache.size = cache_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
zathura->page_cache.cache = g_malloc(zathura->page_cache.size * sizeof(int));
|
zathura->page_cache.cache = g_malloc(zathura->page_cache.size * sizeof(int));
|
||||||
|
Loading…
Reference in New Issue
Block a user