From 235e1efd2fd938ac673a7c196a6264a0df5cfbc5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 7 Dec 2019 20:11:53 +0000 Subject: Resolves: tdf#129243 check return to see if results valid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia4169cda3c1a596ceedd074dd0e59898f9c72ff9 Reviewed-on: https://gerrit.libreoffice.org/84695 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- cui/source/options/optcolor.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cui/source/options') diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 0e6cb822715a..360c18e80d49 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -876,8 +876,10 @@ IMPL_LINK_NOARG(SvxColorOptionsTabPage, AdjustHeaderBar, const Size&, void) { // horizontal positions int nX0 = 0, nX1, nX2, y, width, height; - m_rWidget1.get_extents_relative_to(*m_xTable, nX1, y, width, height); - m_rWidget2.get_extents_relative_to(*m_xTable, nX2, y, width, height); + if (!m_rWidget1.get_extents_relative_to(*m_xTable, nX1, y, width, height)) + return; + if (!m_rWidget2.get_extents_relative_to(*m_xTable, nX2, y, width, height)) + return; auto nTextWidth1 = nX1 - nX0; auto nTextWidth2 = nX2 - nX1; m_xOnFT->set_size_request(nTextWidth1, -1); -- cgit