TabDecorator.cpp: fix dereference of null pointer

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

fixes #13137
This commit is contained in:
Murai Takashi 2016-12-30 12:02:38 +09:00 committed by Adrien Destugues
parent 80d8697c0e
commit 22e3e14aab

View File

@ -465,7 +465,8 @@ TabDecorator::_DistributeTabSize(float delta)
}
// done
previousTab->tabRect.right = floorf(fFrame.right + fBorderWidth);
if (previousTab != NULL)
previousTab->tabRect.right = floorf(fFrame.right + fBorderWidth);
for (int32 i = 0; i < tabCount; i++) {
Decorator::Tab* tab = fTabList.ItemAt(i);