From f262e6661cb32010dbb36010f5c34c016c1762f8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 25 Jan 2022 12:42:42 +0000 Subject: [PATCH] Fix headless builds Signed-off-by: falkTX --- plugins/Cardinal/src/TextEditor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Cardinal/src/TextEditor.cpp b/plugins/Cardinal/src/TextEditor.cpp index a9d1d09..9119b65 100644 --- a/plugins/Cardinal/src/TextEditor.cpp +++ b/plugins/Cardinal/src/TextEditor.cpp @@ -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()));