diff --git a/dlls/itss/chm_lib.c b/dlls/itss/chm_lib.c index 6b80ef2b92a..e0fceb32861 100644 --- a/dlls/itss/chm_lib.c +++ b/dlls/itss/chm_lib.c @@ -759,6 +759,10 @@ struct chmFile *chm_openW(const WCHAR *filename) if (newHandle->index_root == -1) newHandle->index_root = newHandle->index_head; + /* initialize cache */ + chm_set_param(newHandle, CHM_PARAM_MAX_BLOCKS_CACHED, + CHM_MAX_BLOCKS_CACHED); + /* By default, compression is enabled. */ newHandle->compression_enabled = 1; @@ -822,10 +826,6 @@ struct chmFile *chm_openW(const WCHAR *filename) #endif } - /* initialize cache */ - chm_set_param(newHandle, CHM_PARAM_MAX_BLOCKS_CACHED, - CHM_MAX_BLOCKS_CACHED); - return newHandle; }