# Example load\_banks bug?

**URL:** <https://qa.fmod.com/t/example-load-banks-bug/11700>\
**Category:** FMOD Engine\
**Created:** [October 27, 2014, 1:07pm UTC](https://qa.fmod.com/t/example-load-banks-bug/11700 "2014-10-27T13:07:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rvangaal](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/rvangaal/32/11_2.png) [@rvangaal](https://qa.fmod.com/u/rvangaal)\
**Post date:** [October 27, 2014, 1:07pm UTC](https://qa.fmod.com/t/example-load-banks-bug/11700/1 "2014-10-27T13:07:09Z")

</div>

Hi,

In the FMOD 1.05.02 Studio examples, the file load\_banks.cpp contains this:

```
for (int i=0; i<BANK_COUNT; ++i)
{
    if (data.banks[i] == NULL || !data.banks[i]->isValid())
    {
        data.banks[i]->unload();
    }
}

```

This looks a bug; all banks are probably loaded, but this loop effectively does nothing. It should be inverted ( if !(data.banks[i]==NULL||…)) or something like that. Right now, all banks are probably cleaned up from the following system-\>release() instead of being cleaned up explicitly.

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [October 28, 2014, 12:04am UTC](https://qa.fmod.com/t/example-load-banks-bug/11700/2 "2014-10-28T00:04:12Z")

</div>

Thanks for that Ruud. The example is indeed incorrect and will be fixed in the 1.05.05 release.
