summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2019-05-17 12:08:18 +0200
committerHeiko Tietze <tietze.heiko@gmail.com>2019-06-04 11:00:10 +0200
commit5cfac16dbd4af456a7fb6d52c8953c69a72ba2ba (patch)
treebc9c2179cae2474d69d5f5fe266a8704be27458e /svx
parent4abdaf4afb2245d404f6709124b3c627b07b8a3c (diff)
Resolves tdf#125333 - Crash with FindReplaceRememberedSearches=0
Zero remembered searches crash the app when no result is found minimum set to 1 Change-Id: Ib2b4b195d018f0f11238699458066f4d128f8997 Reviewed-on: https://gerrit.libreoffice.org/72459 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> (cherry picked from commit def76a088dea12dfd9d9b796e975e742cbe44ce1) Reviewed-on: https://gerrit.libreoffice.org/73431
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/srchdlg.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 07dd53d75708..791116324361 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -332,6 +332,8 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi
//tdf#122322
nRememberSize = officecfg::Office::Common::Misc::FindReplaceRememberedSearches::get();
+ if (nRememberSize<1)
+ nRememberSize = 1; //0 crashes with no results found
auto nTermWidth = m_xSearchLB->get_approximate_digit_width() * 28;
m_xSearchLB->set_size_request(nTermWidth, -1);