aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2013-07-14 15:11:31 (EDT)
committerMarc-Andre Laperle2013-07-14 15:11:31 (EDT)
commit61f74a5e184c4851fb10bc1efabaf363f55d9f12 (patch)
treea1dec7efc89c738057b010f2be723ed0de09aff9
parentdf7c7dd528fbddb838f9339ec4683d93cf085405 (diff)
downloadegit-61f74a5e184c4851fb10bc1efabaf363f55d9f12.zip
egit-61f74a5e184c4851fb10bc1efabaf363f55d9f12.tar.gz
egit-61f74a5e184c4851fb10bc1efabaf363f55d9f12.tar.bz2
Fix IllegalArgumentException in CommitMessageViewerrefs/changes/39/14539/1
Bug: 412923 Change-Id: Ic920b5c72990c20628d7fa8bf59f8d8444e5b7f6 Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitMessageViewer.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitMessageViewer.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitMessageViewer.java
index ffbe570..55be2c9 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitMessageViewer.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitMessageViewer.java
@@ -139,8 +139,10 @@ class CommitMessageViewer extends SourceViewer implements
t.setCursor(SYS_LINK_CURSOR);
else
t.setCursor(sys_normalCursor);
- for (StyleRange sr : styleRanges)
- getTextWidget().setStyleRange(sr);
+ if (styleRanges != null) {
+ for (StyleRange sr : styleRanges)
+ getTextWidget().setStyleRange(sr);
+ }
}
});
// react on link click
@@ -350,6 +352,7 @@ class CommitMessageViewer extends SourceViewer implements
if (input == commit)
return;
currentDiffs.clear();
+ styleRanges = null;
commit = (PlotCommit<?>) input;
allRefs = getBranches();
if (refsChangedListener != null)