electro-smith / libDaisy

Hardware Library for the Daisy Audio Platform
https://www.electro-smith.com/daisy
MIT License
331 stars 140 forks source link

Move SAI initialized check so it isn't a no-op #589

Closed schult closed 7 months ago

schult commented 1 year ago

The current check for an uninitialized SaiHandle during DeInit is a no-op: &config_ will never be null. This change moves the init check out of the Impl class so that the pimpl_ pointer itself can be examined, allowing the check to work as intended. This also fixes a compiler warning about &config_ never being equal to nullptr.

beserge commented 7 months ago

Nice catch! Thanks for your contribution, works great!