diff options
-rw-r--r-- | src/gui/image/qicon.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 4f31414e10..d3fe8791b7 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -1377,10 +1377,10 @@ bool QIcon::hasThemeIcon(const QString &name) */ void QIcon::setIsMask(bool isMask) { + if (d) + detach(); if (!d) d = new QIconPrivate(new QPixmapIconEngine); - else - detach(); d->is_mask = isMask; } |