Commit f645aa3c authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fix assert when requesting liquify mode on an empty layer

The assert was rather harmless, it just checked if the liquify
mode was initialized or not. Before the recent changes in the
transform tool, currentArgs.isIdentity() could not be called
in case of sckipped initialization, but now it is possible. Just
consider the transformation as identity in case initialization was
skipped.

BUG:428685

# Conflicts:
#	plugins/tools/tool_transform2/tool_transform_args.cc
parent def626e1
......@@ -847,7 +847,9 @@ void KisToolTransform::slotTransactionGenerated(TransformTransactionProperties t
{
if (!m_strokeId || strokeStrategyCookie != m_strokeStrategyCookie) return;
if (transaction.transformedNodes().isEmpty()) {
if (transaction.transformedNodes().isEmpty() ||
transaction.originalRect().isEmpty()) {
KisCanvas2 *kisCanvas = dynamic_cast<KisCanvas2*>(canvas());
KIS_ASSERT(kisCanvas);
kisCanvas->viewManager()->
......
......@@ -288,8 +288,7 @@ bool ToolTransformArgs::isIdentity() const
return true;
} else if (m_mode == LIQUIFY) {
KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(m_liquifyWorker, false);
return m_liquifyWorker->isIdentity();
return !m_liquifyWorker || m_liquifyWorker->isIdentity();
} else {
KIS_ASSERT_RECOVER_NOOP(0 && "unknown transform mode");
return true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment