Fix raster paste crash (#2364)

* Fix raster paste crash
This commit is contained in:
manongjohn 2018-12-19 20:36:48 -05:00 committed by shun-iwasawa
parent 93fdd4ee3f
commit 6dad4e96f4

View file

@ -1159,9 +1159,12 @@ void RasterSelection::pasteSelection(const RasterImageData *riData) {
void RasterSelection::pasteSelection() {
TTool::Application *app = TTool::getApplication();
TTool *tool = app->getCurrentTool()->getTool();
TImageP image = tool->getImage(true);
m_currentImage = image;
m_fid = tool->getCurrentFid();
TImageP image = tool->touchImage();
if (!image) return;
m_currentImage = image;
m_fid = tool->getCurrentFid();
QClipboard *clipboard = QApplication::clipboard();
const RasterImageData *riData =