diff --git a/src/flistview.cpp b/src/flistview.cpp index 1987bfdf..9bb21669 100644 --- a/src/flistview.cpp +++ b/src/flistview.cpp @@ -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; diff --git a/test/foptiattr-test.cpp b/test/foptiattr-test.cpp index a04e9901..b1cda4a2 100644 --- a/test/foptiattr-test.cpp +++ b/test/foptiattr-test.cpp @@ -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; } //----------------------------------------------------------------------