Merge "Protect against self-assignment, plug potential memory leak"
commit
a60f763f25
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue