fix crash when changing chip
it was somehow possible to exceed the channel limit...
This commit is contained in:
parent
9dbb1f7371
commit
f0bf58eef2
4 changed files with 99 additions and 12 deletions
|
|
@ -4284,12 +4284,15 @@ bool FurnaceGUI::loop() {
|
|||
if (ImGui::BeginMenu(fmt::sprintf("%d. %s##_SYSC%d",i+1,getSystemName(e->song.system[i]),i).c_str())) {
|
||||
DivSystem picked=systemPicker();
|
||||
if (picked!=DIV_SYSTEM_NULL) {
|
||||
e->changeSystem(i,picked,preserveChanPos);
|
||||
MARK_MODIFIED;
|
||||
if (e->song.autoSystem) {
|
||||
autoDetectSystem();
|
||||
if (e->changeSystem(i,picked,preserveChanPos)) {
|
||||
MARK_MODIFIED;
|
||||
if (e->song.autoSystem) {
|
||||
autoDetectSystem();
|
||||
}
|
||||
updateWindowTitle();
|
||||
} else {
|
||||
showError("cannot change chip! ("+e->getLastError()+")");
|
||||
}
|
||||
updateWindowTitle();
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue