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:
Alex Wilson 2011-02-17 22:34:52 +00:00
parent d13211ac40
commit 51519728c8

View File

@ -63,7 +63,9 @@ BGroupLayoutBuilder::GetTopLayout(BGroupLayout** _layout)
BView* BView*
BGroupLayoutBuilder::TopView() const BGroupLayoutBuilder::TopView() const
{ {
return TopLayout()->Owner(); if (BGroupLayout* layout = TopLayout())
return layout->Owner();
return NULL;
} }
// GetTopView // GetTopView