Skip to content

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

C

fix crash on save palette level

shun-iwasawa04daa738c8c6
diff --git a/toonz/sources/toonz/iocommand.cpp b/toonz/sources/toonz/iocommand.cpp
index 6b1389cd1..40d72ff7c 100644
--- a/toonz/sources/toonz/iocommand.cpp
+++ b/toonz/sources/toonz/iocommand.cpp
@@ -2997,7 +2997,7 @@ public:
if (sl && sl->getPath().getType() == "pli")
sl->save(palettePath, TFilePath(), true);
- else if (sl->getType() & FULLCOLOR_TYPE)
+ else if (sl && sl->getType() & FULLCOLOR_TYPE)
FullColorPalette::instance()->savePalette(scene);
else
StudioPalette::instance()->save(palettePath, palette);