Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 6d50077d authored by Emanuele Tamponi's avatar Emanuele Tamponi

Added a Q_ASSERT on a dynamic_cast.

svn path=/trunk/koffice/; revision=659187
parent b6e8bb01
......@@ -197,9 +197,12 @@ void KisCanvas2::addCommand(QUndoCommand *command)
KoShapeManager* KisCanvas2::shapeManager() const
KoShape *shape = dynamic_cast<KisShapeController*>(m_d->view->document()->shapeController())->activeLayerShape();
if (shape->shapeId() == KIS_SHAPE_LAYER_ID)
return dynamic_cast<KisShapeLayer*>(shape)->shapeManager();
KisShapeController *controller = dynamic_cast<KisShapeController*>(m_d->view->document()->shapeController());
if (controller->activeLayerShape()->shapeId() == KIS_SHAPE_LAYER_ID)
return dynamic_cast<KisShapeLayer*>(controller->activeLayerShape())->shapeManager();
return m_d->shapeManager;
Markdown is supported
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