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>