Skip to content

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

C

Fix restoring raster tool crash (#2362)

manongjohn5ed36240b542
diff --git a/toonz/sources/tnztools/fullcolorbrushtool.cpp b/toonz/sources/tnztools/fullcolorbrushtool.cpp
index 08fb0aac7..ce46995b0 100644
--- a/toonz/sources/tnztools/fullcolorbrushtool.cpp
+++ b/toonz/sources/tnztools/fullcolorbrushtool.cpp
@@ -350,6 +350,8 @@ void FullColorBrushTool::leftButtonDrag(const TPointD &pos,
TRasterImageP ri = (TRasterImageP)getImage(true);
if (!ri) return;
+ if (!m_toonz_brush) return;
+
TRasterP ras = ri->getRaster();
TPointD rasCenter = ras->getCenterD();
TPointD point(pos + rasCenter);