[git] Fix possible NPE if the status bar has already been disposed

(update can be called later)
This commit is contained in:
Kirill Likhodedov
2015-06-25 18:14:38 +03:00
parent 2685a56ff2
commit 3cd5386003
@@ -165,7 +165,9 @@ public class GitBranchWidget extends EditorBasedWidget implements StatusBarWidge
int maxLength = myMaxString.length() - 1; // -1, because there are arrows indicating that it is a popup
myText = StringUtil.shortenTextWithEllipsis(GitBranchUtil.getDisplayableBranchText(repo), maxLength, 5);
myTooltip = getDisplayableBranchTooltip(repo);
myStatusBar.updateWidget(ID());
if (myStatusBar != null) {
myStatusBar.updateWidget(ID());
}
mySettings.setRecentRoot(repo.getRoot().getPath());
}