summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-09-05 12:44:21 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-09-05 12:44:41 +0200
commitcee813ac6e24b73879312b43695b92fe77b34444 (patch)
treec39999bbb7c5e367059c069faeb0bd2cf5949ecd
parentdcbd4c636b26a3a521895e423546597e9decf45f (diff)
fdo#69162 avoid crashing on Accellerator in poorly initialized context
Change-Id: If3446ae33f2c2e737acf56bb523519e7b9d9935e
-rw-r--r--svtools/source/misc/acceleratorexecute.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index 8d8ebc94e89a..77008c22bd96 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -181,8 +181,11 @@ bool AcceleratorExecute::execute(const css::awt::KeyEvent& aAWTKey)
OUString sCommand = impl_ts_findCommand(aAWTKey);
// No Command found? Do nothing! User isnt interested on any error handling .-)
- if (sCommand.isEmpty())
+ // or for some reason m_xContext is NULL (which would crash impl_ts_getURLParser()
+ if (sCommand.isEmpty() || !m_xContext.is())
+ {
return false;
+ }
// SAFE -> ----------------------------------
::osl::ResettableMutexGuard aLock(m_aLock);