moved the NULL check before dereferencing the view pointer. CID 1063

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27525 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2008-09-15 12:44:07 +00:00
parent a57b0996eb
commit 0bec71008b
1 changed files with 4 additions and 3 deletions

View File

@ -1365,8 +1365,9 @@ TReplicantTray::RealignReplicants(int32 startIndex)
BView *view = NULL;
for (int32 i = startIndex ; i < count ; i++){
fShelf->ReplicantAt(i, &view);
if (view != NULL) {
BPoint loc = LocationForReplicant(i, view->Frame().Width());
if (view && (view->Frame().LeftTop() != loc)) {
if (view->Frame().LeftTop() != loc)
view->MoveTo(loc);
}
}