Guard QWidget::setStyleSheet() against invocation from destructor.

Task-number: QTBUG-45178
Change-Id: I3670d9cd9645155318b595d1324a3b3caf2352f6
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
This commit is contained in:
Friedemann Kleint 2015-03-24 08:40:21 +01:00
parent bc00e6da84
commit d984b07221

View File

@ -2608,6 +2608,8 @@ QString QWidget::styleSheet() const
void QWidget::setStyleSheet(const QString& styleSheet)
{
Q_D(QWidget);
if (data->in_destructor)
return;
d->createExtra();
QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(d->extra->style);