diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-31 11:28:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-08-31 20:13:22 +0200 |
commit | 78876b03874915459f7ebe2135ac146ece92aaf4 (patch) | |
tree | aa3cb4c703de860748c7757fa9a54fa4dc779c54 /sc/source/ui/dialogs/searchresults.cxx | |
parent | 9a7ab3527adef056291ec56c031ebbe3f471af66 (diff) |
Related: tdf#136189 don't assert on unsetting non-existing previous sort column
Change-Id: If2330cc83ace9ec0133b99eec8c2f0be3919013e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101708
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/dialogs/searchresults.cxx')
-rw-r--r-- | sc/source/ui/dialogs/searchresults.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index 950726a18c4e..0f94c64f32e7 100644 --- a/sc/source/ui/dialogs/searchresults.cxx +++ b/sc/source/ui/dialogs/searchresults.cxx @@ -196,7 +196,9 @@ IMPL_LINK(SearchResultsDlg, HeaderBarClick, int, nColumn, void) } else { - mxList->set_sort_indicator(TRISTATE_INDET, mxList->get_sort_column()); + int nOldSortColumn = mxList->get_sort_column(); + if (nOldSortColumn != -1) + mxList->set_sort_indicator(TRISTATE_INDET, nOldSortColumn); mxList->set_sort_column(nColumn); } |