Commit 56ea3158 authored by Cyrille Berger Skott's avatar Cyrille Berger Skott
Browse files

Fix crash in braindump startup

There is a point in time when braindump starts where it creates a canvas without a document, with the recent change in the connection tool this creates a crash when calling handleRadius.
parent 70017a2a
......@@ -249,13 +249,23 @@ void KoToolBase::setStatusText(const QString &statusText)
uint KoToolBase::handleRadius() const
{
Q_D(const KoToolBase);
return d->canvas->shapeController()->resourceManager()->handleRadius();
if(d->canvas->shapeController()->resourceManager())
{
return d->canvas->shapeController()->resourceManager()->handleRadius();
} else {
return 3;
}
}
uint KoToolBase::grabSensitivity() const
{
Q_D(const KoToolBase);
return d->canvas->shapeController()->resourceManager()->grabSensitivity();
if(d->canvas->shapeController()->resourceManager())
{
return d->canvas->shapeController()->resourceManager()->grabSensitivity();
} else {
return 3;
}
}
QRectF KoToolBase::handleGrabRect(const QPointF &position) const
......
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