Browse Source

Fix headless builds

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 3 years ago
parent
commit
f262e6661c
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      plugins/Cardinal/src/TextEditor.cpp

+ 2
- 0
plugins/Cardinal/src/TextEditor.cpp View File

@@ -50,8 +50,10 @@ struct TextEditorModule : Module {
json_t* const rootJ = json_object();
DISTRHO_SAFE_ASSERT_RETURN(rootJ != nullptr, nullptr);

#ifndef HEADLESS
if (ImGuiTextEditor* const widget = widgetPtr)
text = widget->getText();
#endif

json_object_set_new(rootJ, "filepath", json_string(file.c_str()));
json_object_set_new(rootJ, "lang", json_string(lang.c_str()));


Loading…
Cancel
Save