From b57bfba7c1f331e13ca995c493c2973d67aa5021 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 15 Feb 2017 11:01:41 +0000 Subject: Simple work-around for unpleasant framework shutdown to avoid crash. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http://crashreport.libreoffice.org/stats/crash_details/2de31c06-da20-4280-916a-e282a337b16b Change-Id: I0b599de9b36f62d65988c1ab698f1559134fbf7c Reviewed-on: https://gerrit.libreoffice.org/34294 Tested-by: Jenkins Reviewed-by: Michael Meeks (cherry picked from commit 2c60e02bbfde8655828a5b019642f5e85f975e61) Reviewed-on: https://gerrit.libreoffice.org/34297 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/source/window/toolbox2.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vcl/source') diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 37f809c7b485..634591091095 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -635,7 +635,8 @@ ToolBoxButtonSize ToolBox::GetToolboxButtonSize() const /*static*/ Size ToolBox::GetDefaultImageSize(ToolBoxButtonSize eToolBoxButtonSize) { - float fScaleFactor = Application::GetDefaultDevice()->GetDPIScaleFactor(); + OutputDevice *pDefault = Application::GetDefaultDevice(); + float fScaleFactor = pDefault ? pDefault->GetDPIScaleFactor() : 1.0; Size aUnscaledSize = Size(16, 16); -- cgit