diff --git a/toonz/sources/common/tvrender/tpalette.cpp b/toonz/sources/common/tvrender/tpalette.cpp index 6c271f4..b2cbdc4 100644 --- a/toonz/sources/common/tvrender/tpalette.cpp +++ b/toonz/sources/common/tvrender/tpalette.cpp @@ -904,7 +904,7 @@ void TPalette::loadData(TIStream &is) { * original names. */ void TPalette::assign(const TPalette *src, bool isFromStudioPalette) { - if (src == this) return; + if (!src || src == this) return; int i; m_isCleanupPalette = src->isCleanupPalette(); // for(i=0;i styleTable; - for (int s = 0; s < slPlt->getStyleCount(); s++) styleTable[s] = s; + if (slPlt) { + for (int s = 0; s < slPlt->getStyleCount(); s++) styleTable[s] = s; + } // Merge Image for (auto const &image : usedImageSet) {