Fix possible null dereference in BGroupLayoutBuilder, CID #4212
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40548 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d13211ac40
commit
51519728c8
@ -63,7 +63,9 @@ BGroupLayoutBuilder::GetTopLayout(BGroupLayout** _layout)
|
||||
BView*
|
||||
BGroupLayoutBuilder::TopView() const
|
||||
{
|
||||
return TopLayout()->Owner();
|
||||
if (BGroupLayout* layout = TopLayout())
|
||||
return layout->Owner();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GetTopView
|
||||
|
Loading…
Reference in New Issue
Block a user