Skip to content

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

C

Fix(TENV): Correct the initialization of m_rootVarName in EnvGlobals::iniit(), this value is usually inited by SetRootVarName

Abel You46315eb3a67c
diff --git a/toonz/sources/common/tapptools/tenv.cpp b/toonz/sources/common/tapptools/tenv.cpp
index 8f83764c6..5ecc438fb 100644
--- a/toonz/sources/common/tapptools/tenv.cpp
+++ b/toonz/sources/common/tapptools/tenv.cpp
@@ -179,7 +179,10 @@ public:
m_applicationFullName += " " + m_version.getAppNote();
m_moduleName = m_version.getAppName();
- m_rootVarName = toUpper(m_version.getAppName()) + "ROOT";
+ // m_rootVarName value is usually inited by SetRootVarName(), but sometimes
+ // init would be called before SetRootVarName(), so init it here one time
+ m_rootVarName = "TOONZROOT";
+ //m_rootVarName = toUpper(m_version.getAppName()) + "ROOT";
#ifdef _WIN32
// from v1.3, registry root is moved to SOFTWARE\\OpenToonz\\OpenToonz
m_registryRoot =