diff options
Diffstat (limited to 'svtools/source/misc/acceleratorexecute.cxx')
-rw-r--r-- | svtools/source/misc/acceleratorexecute.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 83348b1a779b..4fe6a63d496c 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); |