NPE
authorAnna Kozlova <anna.kozlova@jetbrains.com>
Mon, 23 Jan 2012 09:59:54 +0000 (13:59 +0400)
committerAnna Kozlova <anna.kozlova@jetbrains.com>
Mon, 23 Jan 2012 10:00:58 +0000 (14:00 +0400)
plugins/git4idea/src/git4idea/config/GitVcsPanel.java

index 9d747225be6835276b2c4fe6eee5fe93bad7beef..038951c9bcaeab1d535bf272c343c455ab2da013 100644 (file)
@@ -74,7 +74,8 @@ public class GitVcsPanel {
     myConvertTextFilesComboBox.setSelectedItem(CRLF_ASK);
     myGitField.addBrowseFolderListener(GitBundle.getString("find.git.title"), GitBundle.getString("find.git.description"), project,
                                        FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
-    mySyncBranchControl.setVisible(GitRepositoryManager.getInstance(project).moreThanOneRoot());
+    final GitRepositoryManager repositoryManager = GitRepositoryManager.getInstance(project);
+    mySyncBranchControl.setVisible(repositoryManager != null && repositoryManager.moreThanOneRoot());
   }
 
   /**