diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 130c70d5d..f6fff0b3c 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -2824,7 +2824,11 @@ void FurnaceGUI::drawInsEdit() { updateFMPreview=false; } if (settings.insEditColorize) { - pushAccentColors(uiColors[GUI_COLOR_INSTR_STD+ins->type],uiColors[GUI_COLOR_INSTR_STD+ins->type],uiColors[GUI_COLOR_INSTR_STD+ins->type],ImVec4(0.0f,0.0f,0.0f,0.0f)); + if (ins->type>=DIV_INS_MAX) { + pushAccentColors(uiColors[GUI_COLOR_INSTR_UNKNOWN],uiColors[GUI_COLOR_INSTR_UNKNOWN],uiColors[GUI_COLOR_INSTR_UNKNOWN],ImVec4(0.0f,0.0f,0.0f,0.0f)); + } else { + pushAccentColors(uiColors[GUI_COLOR_INSTR_STD+ins->type],uiColors[GUI_COLOR_INSTR_STD+ins->type],uiColors[GUI_COLOR_INSTR_STD+ins->type],ImVec4(0.0f,0.0f,0.0f,0.0f)); + } } if (ImGui::BeginTable("InsProp",3)) { ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed);