Fix uncaught exception
This commit is contained in:
parent
60009d8f4b
commit
057c295af6
|
@ -1839,7 +1839,16 @@ inline FString FListView::getCheckBox (const FListViewItem* item)
|
|||
checkbox.setString("[ ] ");
|
||||
|
||||
if ( item->isChecked() )
|
||||
checkbox[1] = fc::Times; // Times ×
|
||||
{
|
||||
try
|
||||
{
|
||||
checkbox[1] = fc::Times; // Times ×
|
||||
}
|
||||
catch (const std::out_of_range&)
|
||||
{
|
||||
return checkbox;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return checkbox;
|
||||
|
|
|
@ -281,6 +281,9 @@ void FOptiAttrTest::sgrOptimizerTest()
|
|||
std::strcpy(buffer, CSI "m" CSI "38;2;0;139;139m" CSI "48;2;240;255;240m");
|
||||
sgr_optimizer.optimize();
|
||||
CPPUNIT_ASSERT_CSTRING ( buffer, C_STR(CSI "0;38;2;0;139;139;48;2;240;255;240m") );
|
||||
|
||||
delete to;
|
||||
delete from;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue