diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-09-05 12:44:21 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-09-05 05:48:11 -0500 |
commit | 233e6a62d12d2d67089f1934777ac41c9fc88238 (patch) | |
tree | f9e77ab7a73f96bcf36792aef48186e40450354d /svtools | |
parent | 9448bf9182ffd4280cc17d9e5572934871a5c035 (diff) |
fdo#69162 avoid crashing on Accellerator in poorly initialized context
Change-Id: If3446ae33f2c2e737acf56bb523519e7b9d9935e
Reviewed-on: https://gerrit.libreoffice.org/11293
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'svtools')
-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); |