summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/qstyle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 239d873649..8d8764b76b 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -2401,17 +2401,19 @@ int QStyle::combinedLayoutSpacing(QSizePolicy::ControlTypes controls1,
const QStyle * QStyle::proxy() const
{
Q_D(const QStyle);
- return d->proxyStyle;
+ return d->proxyStyle == this ? this : d->proxyStyle->proxy();
}
/* \internal
This function sets the base style that style calls will be
- redirected to. Note that ownership is not transferred.
+ redirected to. Note that ownership is not transferred. \a style
+ must be a valid pointer (not nullptr).
*/
void QStyle::setProxy(QStyle *style)
{
Q_D(QStyle);
+ Q_ASSERT(style);
d->proxyStyle = style;
}