diff options
Diffstat (limited to 'src/drumkitloader.cc')
-rw-r--r-- | src/drumkitloader.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drumkitloader.cc b/src/drumkitloader.cc index 2ad6b0e..77b7021 100644 --- a/src/drumkitloader.cc +++ b/src/drumkitloader.cc @@ -207,9 +207,9 @@ void DrumKitLoader::loadKit(DrumKit *kit) DEBUG(loader, "cache_enable: %s\n", cache_enable?"true":"false"); - if(cache_enable) + auto number_of_files = kit->getNumberOfFiles(); + if(cache_enable && number_of_files > 0) { - auto number_of_files = kit->getNumberOfFiles(); auto cache_limit_per_file = cache_limit / number_of_files; assert(framesize != 0); |