In fixing CID #5841, I found that not only does the code in BAbstractLayout::AllUnarchived() leak, it is also mostly unnecessary! (mea culpa) This fixes both problems.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40140 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0ee86c8d2f
commit
d3e72a992d
|
@ -422,18 +422,10 @@ BAbstractLayout::Archive(BMessage* into, bool deep) const
|
|||
status_t
|
||||
BAbstractLayout::AllUnarchived(const BMessage* from)
|
||||
{
|
||||
if (Owner()) {
|
||||
ViewProxy* proxy = dynamic_cast<ViewProxy*>(fExplicitData);
|
||||
if (!proxy) {
|
||||
delete fExplicitData;
|
||||
proxy = new ViewProxy(Owner());
|
||||
}
|
||||
proxy->view = Owner();
|
||||
} else {
|
||||
fExplicitData = new DataProxy();
|
||||
return fExplicitData->RestoreDataFromArchive(from);
|
||||
}
|
||||
|
||||
status_t err = fExplicitData->RestoreDataFromArchive(from);
|
||||
if (err != B_OK)
|
||||
return err;
|
||||
|
||||
return BLayout::AllUnarchived(from);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue