vcl/qt5/Qt5Instance.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit c6fb366e05370af553af2130b370909ed4495cff Author: Jan-Marek Glogowski <jan-marek.glogow...@extern.cib.de> AuthorDate: Fri Feb 21 00:22:37 2020 +0100 Commit: Jan-Marek Glogowski <glo...@fbihome.de> CommitDate: Sat Feb 22 01:15:20 2020 +0100 tdf#130499 Qt5 no qApp == main thread If there is no QApplication, we can ignore the GUI thread. Change-Id: I0d2faf4799d493ad0b6074b40242c443d4bc43dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89241 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index 1a0f10864e41..855f32d249af 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -400,7 +400,10 @@ void Qt5Instance::AddToRecentDocumentList(const OUString&, const OUString&, cons OpenGLContext* Qt5Instance::CreateOpenGLContext() { return new Qt5OpenGLContext; } -bool Qt5Instance::IsMainThread() const { return qApp->thread() == QThread::currentThread(); } +bool Qt5Instance::IsMainThread() const +{ + return !qApp || (qApp->thread() == QThread::currentThread()); +} void Qt5Instance::TriggerUserEventProcessing() { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits