Fix headless builds

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-01-25 12:42:42 +00:00
parent 74df0a8d4f
commit f262e6661c
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0

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()));