diff --git a/src/renderer/painter.cpp b/src/renderer/painter.cpp index 9f889fb3f..5aba3b1b8 100644 --- a/src/renderer/painter.cpp +++ b/src/renderer/painter.cpp @@ -67,17 +67,17 @@ void Painter::setup() { } void Painter::setupShaders() { - plainShader = std::make_unique(); - outlineShader = std::make_unique(); - lineShader = std::make_unique(); - linejoinShader = std::make_unique(); - patternShader = std::make_unique(); - iconShader = std::make_unique(); - rasterShader = std::make_unique(); - textShader = std::make_unique(); - dotShader = std::make_unique(); - compositeShader = std::make_unique(); - gaussianShader = std::make_unique(); + if (!plainShader) plainShader = std::make_unique(); + if (!outlineShader) outlineShader = std::make_unique(); + if (!lineShader) lineShader = std::make_unique(); + if (!linejoinShader) linejoinShader = std::make_unique(); + if (!patternShader) patternShader = std::make_unique(); + if (!iconShader) iconShader = std::make_unique(); + if (!rasterShader) rasterShader = std::make_unique(); + if (!textShader) textShader = std::make_unique(); + if (!dotShader) dotShader = std::make_unique(); + if (!compositeShader) compositeShader = std::make_unique(); + if (!gaussianShader) gaussianShader = std::make_unique(); } void Painter::cleanup() {