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; ;
index += delta) {
BColumn* column = poseView->ColumnAt(index);
if (column == NULL)
if (column == NULL) {
// out of columns
break;
}
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();
found = true;
continue;