diff: do not show 'contents identical' if we can't calculate diff
[idea/community.git] / platform / platform-impl / src / com / intellij / openapi / diff / impl / DiffPanelImpl.java
index e421492bf272955265032d62809dc082738d8560..13585f91fbcd904d84213afe167cbeee37d13610 100644 (file)
@@ -347,8 +347,8 @@ public class DiffPanelImpl implements DiffPanelEx, ContentChangeListener, TwoSid
         myPanel.removeTopComponent(myTopMessageDiffPanel);
       }
       LineBlocks blocks = myData.updateEditors();
-      setLineBlocks(blocks);
-      if (blocks.getCount() == 0) {
+      setLineBlocks(blocks != null ? blocks : LineBlocks.EMPTY);
+      if (blocks != null && blocks.getCount() == 0) {
         if (myData.isContentsEqual()) {
           setFileContentsAreIdentical();
         }
@@ -420,7 +420,7 @@ public class DiffPanelImpl implements DiffPanelEx, ContentChangeListener, TwoSid
     setTitle(title, false);
   }
 
-  private void setLineBlocks(LineBlocks blocks) {
+  private void setLineBlocks(@NotNull LineBlocks blocks) {
     myLineBlocks = blocks;
     mySplitter.redrawDiffs();
     updateStatusBar();