mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-24 06:10:09 +01:00
Fix an assertion in Nyquist Workbench
This commit is contained in:
@@ -326,17 +326,18 @@ void NyqTextCtrl::OnUpdate(wxUpdateUIEvent & e)
|
|||||||
int lpos = wxMax(0, pos - 1);
|
int lpos = wxMax(0, pos - 1);
|
||||||
|
|
||||||
wxString text = GetRange(lpos, pos);
|
wxString text = GetRange(lpos, pos);
|
||||||
|
if (text.Length() > 0) {
|
||||||
if (text[0] == wxT('(')) {
|
if (text[0] == wxT('(')) {
|
||||||
wxLongToLongHashMap::const_iterator left = mLeftParens.find(lpos);
|
wxLongToLongHashMap::const_iterator left = mLeftParens.find(lpos);
|
||||||
if (left != mLeftParens.end()) {
|
if (left != mLeftParens.end()) {
|
||||||
Colorize(lpos, left->second);
|
Colorize(lpos, left->second);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if (text[0] == wxT(')')) {
|
||||||
else if (text[0] == wxT(')')) {
|
wxLongToLongHashMap::const_iterator right = mRightParens.find(lpos);
|
||||||
wxLongToLongHashMap::const_iterator right = mRightParens.find(lpos);
|
if (right != mRightParens.end()) {
|
||||||
if (right != mRightParens.end()) {
|
Colorize(right->second, lpos);
|
||||||
Colorize(right->second, lpos);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user