Fix NPE in CommitMessageViewer.getBranches when db is null
The following can be reproduced by running one of HistoryViewTest:
java.lang.NullPointerException
at org.eclipse.egit.ui.internal.history.CommitMessageViewer.getBranches(CommitMessageViewer.java:389)
at org.eclipse.egit.ui.internal.history.CommitMessageViewer.setInput(CommitMessageViewer.java:366)
at org.eclipse.egit.ui.internal.history.GitHistoryPage.clearCommentViewer(GitHistoryPage.java:1081)
at org.eclipse.egit.ui.internal.history.GitHistoryPage.clearHistoryPage(GitHistoryPage.java:1074)
at org.eclipse.egit.ui.internal.history.GitHistoryPage.setFocus(GitHistoryPage.java:1060)
Change-Id: Ie14380c7f13d54ca264f83b442ea55e2ec813ed0
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>