Browse Source

Dont give nullptr as response to requestStateFile(); Fix build

Signed-off-by: falkTX <falktx@falktx.com>
pull/309/head
falkTX 3 years ago
parent
commit
d85add3a4c
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 3 additions and 2 deletions
  1. +2
    -2
      distrho/src/DistrhoUIPrivateData.hpp
  2. +1
    -0
      examples/FileHandling/NanoButton.hpp

+ 2
- 2
distrho/src/DistrhoUIPrivateData.hpp View File

@@ -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;
}


+ 1
- 0
examples/FileHandling/NanoButton.hpp View File

@@ -22,6 +22,7 @@
#define NANO_BUTTON_HPP_INCLUDED

#include "NanoVG.hpp"
#include "EventHandlers.hpp"

#include <string>



Loading…
Cancel
Save