commit d85add3a4c3434b51b822b416cfb963c6f878037
parent e5df7030c2cf49478f15ed0831c215137ddb8b59
Author: falkTX <falktx@falktx.com>
Date: Sat, 14 Aug 2021 20:44:01 +0100
Dont give nullptr as response to requestStateFile(); Fix build
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git 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
@@ -22,6 +22,7 @@
#define NANO_BUTTON_HPP_INCLUDED
#include "NanoVG.hpp"
+#include "EventHandlers.hpp"
#include <string>