Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2010-09-13 13:50:50 +0000
committerCode Review2010-09-13 13:50:50 +0000
commitc778ea34624b7ec9ec37d6d17a50b610007d40bd (patch)
tree43f577bf713d4f896445430d2da5704f547bdf8b /org.eclipse.egit.ui
parent2303abaa4ffd78897f95bec14d788d5d28ece0b3 (diff)
parenta35fb8c652acbfd41292d1c97b5998dd26a0dfce (diff)
downloadegit-c778ea34624b7ec9ec37d6d17a50b610007d40bd.tar.gz
egit-c778ea34624b7ec9ec37d6d17a50b610007d40bd.tar.xz
egit-c778ea34624b7ec9ec37d6d17a50b610007d40bd.zip
Merge "Fix NullPointer in HistoryView"
Diffstat (limited to 'org.eclipse.egit.ui')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
index addca61eeb..52d0c5a321 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
@@ -1009,10 +1009,6 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
return false;
db = null;
- if (currentWalk != null) {
- currentWalk.release();
- currentWalk = null;
- }
final ArrayList<String> paths = new ArrayList<String>(in.length);
for (final IResource r : in) {
@@ -1054,7 +1050,7 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
return false;
}
- if (pathChange(pathFilters, paths)
+ if (pathChange(pathFilters, paths) || currentWalk == null
|| headId != null && !headId.equals(currentHeadId)) {
// TODO Do not dispose SWTWalk just because HEAD changed
// In theory we should be able to update the graph and
@@ -1062,6 +1058,8 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
// HEAD^1 and the old HEAD commit should not be visible.
//
currentHeadId = headId;
+ if (currentWalk != null)
+ currentWalk.release();
currentWalk = new SWTWalk(db);
currentWalk.sort(RevSort.COMMIT_TIME_DESC, true);
currentWalk.sort(RevSort.BOUNDARY, true);

Back to the top