summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2017-02-15 11:01:41 +0000
committerMichael Meeks <michael.meeks@collabora.com>2017-02-15 13:43:26 +0000
commit2c60e02bbfde8655828a5b019642f5e85f975e61 (patch)
tree94d8ef605dce9552ab76a03acb04d0f821036e68
parentd96d0770a05bed00d13c3035562404c165bd2aeb (diff)
Simple work-around for unpleasant framework shutdown to avoid crash.
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 <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--vcl/source/window/toolbox2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index ec58bbd8c415..4be71d608377 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);