GUI: fix possible crash with colorize ins
This commit is contained in:
parent
75323be54e
commit
4f86219989
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue