From ca1118a40fae95f47d0c19fab3f0005a1fe437e2 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 19 Oct 2022 13:53:56 -0500 Subject: [PATCH] GUI: fix crash in no asset menu (wave/sample) --- src/gui/sampleEdit.cpp | 5 ++++- src/gui/waveEdit.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index ac7845426..1d1b4e97f 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -60,7 +60,10 @@ void FurnaceGUI::drawSampleEdit() { if (e->song.sample.size()>0) { if (ImGui::BeginCombo("##SampleSelect","select one...")) { - actualSampleList(); + if (ImGui::BeginTable("SampleSelCombo",1,ImGuiTableFlags_ScrollY)) { + actualSampleList(); + ImGui::EndTable(); + } ImGui::EndCombo(); } ImGui::SameLine(); diff --git a/src/gui/waveEdit.cpp b/src/gui/waveEdit.cpp index b678ad110..41ac5cbf7 100644 --- a/src/gui/waveEdit.cpp +++ b/src/gui/waveEdit.cpp @@ -200,7 +200,10 @@ void FurnaceGUI::drawWaveEdit() { if (e->song.wave.size()>0) { if (ImGui::BeginCombo("##WaveSelect","select one...")) { - actualWaveList(); + if (ImGui::BeginTable("WaveSelCombo",1,ImGuiTableFlags_ScrollY)) { + actualWaveList(); + ImGui::EndTable(); + } ImGui::EndCombo(); } ImGui::SameLine();