Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tasse2014-06-05 16:52:57 -0400
committerPatrick Tasse2014-06-06 10:33:12 -0400
commitc9137e1c8cfb59bbe57677279b992f5ba0cfa864 (patch)
tree8c8a426f02f2e2159b3b15a3ca943afa4c6b9a53
parentd8757ff23eb659cc981f97ea319a1e1ca0b15960 (diff)
downloadorg.eclipse.linuxtools-c9137e1c8cfb59bbe57677279b992f5ba0cfa864.tar.gz
org.eclipse.linuxtools-c9137e1c8cfb59bbe57677279b992f5ba0cfa864.tar.xz
org.eclipse.linuxtools-c9137e1c8cfb59bbe57677279b992f5ba0cfa864.zip
tmf: Bug 436751: NPE deleting unexpanded Tracing project
Change-Id: Id3e7cb3cf7152a2e841366c7e3b90853236b9542 Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-on: https://git.eclipse.org/r/28081 Tested-by: Hudson CI
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfProjectRegistry.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfProjectRegistry.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfProjectRegistry.java
index 6c0829a40d..2cc37f4a82 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfProjectRegistry.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfProjectRegistry.java
@@ -160,8 +160,11 @@ public class TmfProjectRegistry implements IResourceChangeListener {
if (event.getResource() instanceof IProject) {
IProject project = (IProject) event.getResource();
try {
- if (project.hasNature(TmfProjectNature.ID)) {
+ if (project.isAccessible() && project.hasNature(TmfProjectNature.ID)) {
TmfProjectElement tmfProjectElement = registry.get(project);
+ if (tmfProjectElement == null) {
+ return;
+ }
final List<TmfTraceElement> traces = tmfProjectElement.getTracesFolder().getTraces();
if (!traces.isEmpty()) {
// Close editors in UI Thread

Back to the top