Fix crash

pull/2692/head
Nelsson Huotari 5 years ago
parent 731e5b57f5
commit e14c390a9b

@ -1399,7 +1399,7 @@ void CSVRender::TerrainShapeMode::mouseMoveEvent (QMouseEvent *event)
{
WorldspaceHitResult hit = getWorldspaceWidget().mousePick(event->pos(), getInteractionMask());
if (hit.hit && mBrushDraw && !(mShapeEditTool == ShapeEditTool_Drag && mIsEditing)) mBrushDraw->update(hit.worldPos, mBrushSize, mBrushShape);
if (!hit.hit && !(mShapeEditTool == ShapeEditTool_Drag && mIsEditing)) mBrushDraw->hide();
if (!hit.hit && mBrushDraw && !(mShapeEditTool == ShapeEditTool_Drag && mIsEditing)) mBrushDraw->hide();
}
void CSVRender::TerrainShapeMode::setBrushSize(int brushSize)

@ -725,7 +725,7 @@ void CSVRender::TerrainTextureMode::mouseMoveEvent (QMouseEvent *event)
{
WorldspaceHitResult hit = getWorldspaceWidget().mousePick(event->pos(), getInteractionMask());
if (hit.hit && mBrushDraw) mBrushDraw->update(hit.worldPos, mBrushSize, mBrushShape);
if (!hit.hit) mBrushDraw->hide();
if (!hit.hit && mBrushDraw) mBrushDraw->hide();
}

Loading…
Cancel
Save