diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-11-06 13:18:31 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-11-07 16:05:30 +0100 |
commit | 86702fa29c4ace2f94be651db1fd7b158598be80 (patch) | |
tree | 3a44be4c481e4af31150c76f4dd94eede935600e /src/gui/image/qimage.cpp | |
parent | b5feb28d63f763f1f830af1f7586712aa45ef4be (diff) |
Protect QImage colorspace transform on shutdown
Adding a check here similar to fixups in other threaded qimage routines.
Pick-to: 5.15
Change-Id: If7bf7aa0ef78cda15171c9038f41b281fb267dae
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r-- | src/gui/image/qimage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 6edf48d3ba..d05a72acc6 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4861,7 +4861,7 @@ void QImage::applyColorTransform(const QColorTransform &transform) int segments = sizeInBytes() / (1<<16); segments = std::min(segments, height()); QThreadPool *threadPool = QThreadPool::globalInstance(); - if (segments > 1 && !threadPool->contains(QThread::currentThread())) { + if (segments > 1 && threadPool && !threadPool->contains(QThread::currentThread())) { QSemaphore semaphore; int y = 0; for (int i = 0; i < segments; ++i) { |