fix NPE on first layout (IDEA-81813)

This commit is contained in:
Dmitry Jemerov
2012-02-24 11:48:58 +01:00
parent ed162e285d
commit 92ff49d782
@@ -80,7 +80,7 @@ public class ScrollableSingleRowLayout extends SingleRowLayout {
protected void recomputeToLayout(SingleRowPassInfo data) {
calculateRequiredLength(data);
clampScrollOffsetToBounds(data);
if (myScrollSelectionInViewPending || !data.layoutSize.equals(myLastSingRowLayout.layoutSize)) {
if (myScrollSelectionInViewPending || myLastSingRowLayout == null || !data.layoutSize.equals(myLastSingRowLayout.layoutSize)) {
myScrollSelectionInViewPending = false;
doScrollSelectionInView(data);
}