summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-05-21 01:26:53 +0300
committerTor Lillqvist <tml@collabora.com>2019-05-21 01:37:33 +0300
commit30b8d352bdfd2128769f3ae1e8a3616118d3e754 (patch)
tree90ab0aa3a6c192d8291b9deee7f75da16adcb5bd
parente897310c14c0f6176873c945503f097e62b6759d (diff)
tdf#125397: Avoid crash if GetpApp() returns null, can happen on iOS at least
Change-Id: Ib0dfb00c6a00640fe35769f21f167bf3eae8769b
-rw-r--r--vcl/source/window/window.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index e22a0e34f25f..c3de69baea68 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2349,7 +2349,9 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
if ( !pSVData->mpIntroWindow )
{
// The right way would be just to call this (not even in the 'if')
- GetpApp()->InitFinished();
+ auto pApp = GetpApp();
+ if ( pApp )
+ pApp->InitFinished();
}
else if ( !ImplIsWindowOrChild( pSVData->mpIntroWindow ) )
{