mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[git] Fix possible NPE if the status bar has already been disposed
(update can be called later)
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user