Commit 36b8a843 authored by Thomas Zander's avatar Thomas Zander

Protect against assigning the same border which could lead us to delete it before.

svn path=/trunk/koffice/; revision=1002521
parent 9807cb05
...@@ -788,12 +788,12 @@ KoShapeBorderModel *KoShape::border() const ...@@ -788,12 +788,12 @@ KoShapeBorderModel *KoShape::border() const
void KoShape::setBorder(KoShapeBorderModel *border) void KoShape::setBorder(KoShapeBorderModel *border)
{ {
Q_D(KoShape); Q_D(KoShape);
if (border)
d->updateBorder(); d->updateBorder();
if (d->border) if (d->border)
d->border->removeUser(); d->border->removeUser();
d->border = border; d->border = border;
if (d->border)
d->updateBorder(); d->updateBorder();
d->shapeChanged(BorderChanged); d->shapeChanged(BorderChanged);
notifyChanged(); notifyChanged();
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