summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-31 11:28:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-08-31 20:13:22 +0200
commit78876b03874915459f7ebe2135ac146ece92aaf4 (patch)
treeaa3cb4c703de860748c7757fa9a54fa4dc779c54 /cui
parent9a7ab3527adef056291ec56c031ebbe3f471af66 (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 'cui')
-rw-r--r--cui/source/options/optaboutconfig.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index cd91c4735048..f813c9a7c609 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -181,7 +181,9 @@ IMPL_LINK(CuiAboutConfigTabPage, HeaderBarClick, int, nColumn, void)
}
else
{
- m_xPrefBox->set_sort_indicator(TRISTATE_INDET, m_xPrefBox->get_sort_column());
+ int nOldSortColumn = m_xPrefBox->get_sort_column();
+ if (nOldSortColumn != -1)
+ m_xPrefBox->set_sort_indicator(TRISTATE_INDET, nOldSortColumn);
m_xPrefBox->set_sort_column(nColumn);
}