summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-03-10 21:11:55 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-03-11 09:19:21 +0100
commit12ddf044693fbe205844d796c2f31bb706f63584 (patch)
tree8cfd6654635dbe59eb3263a92c58fef9015e2a41 /sfx2
parentc185263f45a556e6c695c766476e67fbd2ea3593 (diff)
sfx2: fix UB in SfxBindings::LeaveRegistrations()
Seen during online.git's unit-wopi-temp test: sfx2/source/control/bindings.cxx:1374:45: runtime error: member call on null pointer of type 'SfxApplication' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior sfx2/source/control/bindings.cxx:1374:45 in Assume that no longer having a SfxApplication is the same as IsDowning() returning true. Change-Id: I31149e98d18202e99d95638470428b2bce16dfc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90304 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/bindings.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index cf5dff142be9..559779e7f127 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1371,7 +1371,7 @@ void SfxBindings::LeaveRegistrations( const char *pFile, int nLine )
pImpl->nOwnRegLevel--;
// check if this is the outer most level
- if ( --nRegLevel == 0 && !SfxGetpApp()->IsDowning() )
+ if ( --nRegLevel == 0 && SfxGetpApp() && !SfxGetpApp()->IsDowning() )
{
if ( pImpl->bContextChanged )
{