OpenToonz - An open-source full-featured 2D animation creation software
C
Prevent crash on deactivation on empty cell
manongjohn482ab465ec56
diff --git a/toonz/sources/tnztools/toonzrasterbrushtool.cpp b/toonz/sources/tnztools/toonzrasterbrushtool.cppindex 589e04045..b63222161 100644--- a/toonz/sources/tnztools/toonzrasterbrushtool.cpp+++ b/toonz/sources/tnztools/toonzrasterbrushtool.cpp@@ -1133,6 +1133,7 @@ void ToonzRasterBrushTool::onDeactivate() {if (m_tileSaver) {bool isValid = m_enabled && m_active;m_enabled = false;+ m_active = false;if (isValid) {finishRasterBrush(m_mousePos,1); /*-- 最後のストロークの筆圧は1とする --*/@@ -1474,6 +1475,7 @@ void ToonzRasterBrushTool::leftButtonUp(const TPointD &pos,const TMouseEvent &e) {bool isValid = m_enabled && m_active;m_enabled = false;+ m_active = false;if (!isValid) {return;}@@ -1489,6 +1491,8 @@ void ToonzRasterBrushTool::finishRasterBrush(const TPointD &pos,double pressureVal) {TToonzImageP ti = TImageP(getImage(true));+ if (!ti) return;+TPointD rasCenter = ti->getRaster()->getCenterD();TTool::Application *app = TTool::getApplication();TXshLevel *level = app->getCurrentLevel()->getLevel();