Skip to content

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

C

Fix shift/ctrl-right click empty column crash (#2612)

manongjohn1223e0dc7b91
diff --git a/toonz/sources/toonz/columnselection.cpp b/toonz/sources/toonz/columnselection.cpp
index 4bd705e40..78b90caa0 100644
--- a/toonz/sources/toonz/columnselection.cpp
+++ b/toonz/sources/toonz/columnselection.cpp
@@ -130,7 +130,8 @@ void TColumnSelection::explodeChild() {
static bool canMergeColumns(int column, int mColumn, bool forMatchlines) {
TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet();
- if (xsh->getColumn(column)->isLocked()) return false;
+ if (!xsh || !xsh->getColumn(column) || xsh->getColumn(column)->isLocked())
+ return false;
int start, end;
xsh->getCellRange(column, start, end);