Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Fix vector thumbnails after offline GL resize

Rodney53bd2e574fdd
diff --git a/toonz/sources/toonzqt/icongenerator.cpp b/toonz/sources/toonzqt/icongenerator.cpp
index e76b2a591..5d5c340ea 100644
--- a/toonz/sources/toonzqt/icongenerator.cpp
+++ b/toonz/sources/toonzqt/icongenerator.cpp
@@ -1443,6 +1443,8 @@ TOfflineGL *IconGenerator::getOfflineGLContext(const TDimension &minSize) {
const TDimension actualSize = context->getSize();
if (actualSize.lx < requiredSize.lx || actualSize.ly < requiredSize.ly) {
+ // Destroy the old FBO before the replacement context becomes current.
+ m_contexts.setLocalData(nullptr);
context = new TOfflineGL(requiredSize);
m_contexts.setLocalData(context);
}