diff --git a/toonz/sources/toonzqt/studiopaletteviewer.cpp b/toonz/sources/toonzqt/studiopaletteviewer.cpp index 2d88c05..dc19621 100644 --- a/toonz/sources/toonzqt/studiopaletteviewer.cpp +++ b/toonz/sources/toonzqt/studiopaletteviewer.cpp @@ -714,6 +714,9 @@ void StudioPaletteTreeViewer::loadInCurrentPaletteAndAdaptLevel() { TPalette *palette = m_levelPaletteHandle->getPalette(); if (!palette) return; + // prevent crash when the command is applied to the palette level + if (!m_currentLevelHandle->getSimpleLevel()) return; + TPalette *newPalette = StudioPalette::instance()->getPalette(getItemPath(items[0]), true); if (!newPalette) return;