OpenToonz - An open-source full-featured 2D animation creation software
C
Fix crash when pasting external image into camera column
Anderson Prado47a210b98119
diff --git a/toonz/sources/toonz/cellselection.cpp b/toonz/sources/toonz/cellselection.cppindex 651ff8f39..96f16b759 100644--- a/toonz/sources/toonz/cellselection.cpp+++ b/toonz/sources/toonz/cellselection.cpp@@ -2076,8 +2076,12 @@ void TCellSelection::pasteCells() {const RasterImageData *rasterImageData =dynamic_cast<const RasterImageData *>(mimeData);if (rasterImageData || clipImage.height() > 0) {- if (isEmpty()) // Nothing selected.+ if (isEmpty()) return;+ // Prevent pasting raster images into the camera column (c0 < 0)+ if (c0 < 0) {+ DVGui::warning(QObject::tr("Cannot paste into the camera column."));return;+ }// get the current image and find out the typeTImageP img = xsh->getCell(r0, c0).getImage(false);