Tracker: check if widget == NULL, CID 600509

Add a few helpful comments too.
This commit is contained in:
John Scipione 2014-07-22 18:41:18 -04:00
parent ab28908d2d
commit 10489e89dd

View File

@ -427,11 +427,18 @@ BPose::EditPreviousNextWidgetCommon(BPoseView* poseView, bool next)
for (int32 index = next ? 0 : poseView->CountColumns() - 1; ; for (int32 index = next ? 0 : poseView->CountColumns() - 1; ;
index += delta) { index += delta) {
BColumn* column = poseView->ColumnAt(index); BColumn* column = poseView->ColumnAt(index);
if (column == NULL) if (column == NULL) {
// out of columns
break; break;
}
BTextWidget* widget = WidgetFor(column->AttrHash()); BTextWidget* widget = WidgetFor(column->AttrHash());
if (widget != NULL && widget->IsActive()) { if (widget == NULL) {
// no widget for this column, next
continue;
}
if (widget->IsActive()) {
poseView->CommitActivePose(); poseView->CommitActivePose();
found = true; found = true;
continue; continue;