Skip to content

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

C

fix_vector_replacement_crash

manongjohn0c187d4db334
diff --git a/toonz/sources/toonz/cellselection.cpp b/toonz/sources/toonz/cellselection.cpp
index 3c23b5ee5..f4179a9d4 100644
--- a/toonz/sources/toonz/cellselection.cpp
+++ b/toonz/sources/toonz/cellselection.cpp
@@ -2632,7 +2632,7 @@ bool TCellSelection::areOnlyVectorCellsSelected() {
}
TXshSimpleLevel *sourceSl = firstCell.getSimpleLevel();
- if (sourceSl->getType() != PLI_XSHLEVEL) {
+ if (!sourceSl || sourceSl->getType() != PLI_XSHLEVEL) {
DVGui::error(QObject::tr("This command only works on vector cells."));
return false;
}