renderer: mutex around color context creation/retrieval
This commit is contained in:
@@ -75,6 +75,8 @@ void Renderer::Destroy()
|
||||
|
||||
bool Renderer::GetColorContext(ColorProcessorPtr color_processor, Renderer::ColorContext *ctx)
|
||||
{
|
||||
QMutexLocker locker(&color_cache_mutex_);
|
||||
|
||||
ColorContext& color_ctx = *ctx;
|
||||
|
||||
if (color_cache_.contains(color_processor->id())) {
|
||||
|
||||
@@ -125,6 +125,8 @@ private:
|
||||
|
||||
QHash<QString, ColorContext> color_cache_;
|
||||
|
||||
QMutex color_cache_mutex_;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user