From 92ff49d782f2a8bf0c99dd7dd37fbb1e83e28d4f Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 24 Feb 2012 11:48:58 +0100 Subject: [PATCH] fix NPE on first layout (IDEA-81813) --- .../ui/tabs/impl/singleRow/ScrollableSingleRowLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/ScrollableSingleRowLayout.java b/platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/ScrollableSingleRowLayout.java index 4661611f1f2a..098fe956736a 100644 --- a/platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/ScrollableSingleRowLayout.java +++ b/platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/ScrollableSingleRowLayout.java @@ -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); }