renderer: mutex around color context creation/retrieval

This commit is contained in:
itsmattkc
2020-11-28 08:24:40 +11:00
parent b178dfa06e
commit 466900e579
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -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())) {
+2
View File
@@ -125,6 +125,8 @@ private:
QHash<QString, ColorContext> color_cache_;
QMutex color_cache_mutex_;
};
}