diff --git a/distrho/src/DistrhoUIPrivateData.hpp b/distrho/src/DistrhoUIPrivateData.hpp index cf266a3e..da3d75a6 100644 --- a/distrho/src/DistrhoUIPrivateData.hpp +++ b/distrho/src/DistrhoUIPrivateData.hpp @@ -337,9 +337,9 @@ inline void PluginWindow::onFileSelected(const char* const filename) { ui->uiData->uiStateFileKeyRequest = nullptr; // notify DSP - ui->setState(key, filename); + ui->setState(key, filename != nullptr ? filename : ""); // notify UI - ui->stateChanged(key, filename); + ui->stateChanged(key, filename != nullptr ? filename : ""); std::free(key); return; } diff --git a/examples/FileHandling/NanoButton.hpp b/examples/FileHandling/NanoButton.hpp index 77f9bc6e..544ce1cc 100644 --- a/examples/FileHandling/NanoButton.hpp +++ b/examples/FileHandling/NanoButton.hpp @@ -22,6 +22,7 @@ #define NANO_BUTTON_HPP_INCLUDED #include "NanoVG.hpp" +#include "EventHandlers.hpp" #include