Merge "Protect against self-assignment, plug potential memory leak"

bb10
Volker Hilsheimer 2021-03-01 11:31:11 +01:00 committed by Qt CI Bot
commit a60f763f25
1 changed files with 4 additions and 0 deletions

View File

@ -182,7 +182,11 @@ QSize QDockAreaLayoutItem::sizeHint() const
QDockAreaLayoutItem
&QDockAreaLayoutItem::operator = (const QDockAreaLayoutItem &other)
{
if (this == &other)
return *this;
widgetItem = other.widgetItem;
delete subinfo;
if (other.subinfo == nullptr)
subinfo = nullptr;
else