aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Watson2014-04-10 09:24:35 (EDT)
committerAlexander Kurtakov2014-04-11 05:00:53 (EDT)
commite042bcd0f92ca39a8d0634a4f4a45a57636f93f6 (patch)
tree42566a8466d750d93e707003f29567542e3bc041
parent636f4a411a1379e9e421874e1f901cc32061ab80 (diff)
downloadorg.eclipse.linuxtools-e042bcd0f92ca39a8d0634a4f4a45a57636f93f6.zip
org.eclipse.linuxtools-e042bcd0f92ca39a8d0634a4f4a45a57636f93f6.tar.gz
org.eclipse.linuxtools-e042bcd0f92ca39a8d0634a4f4a45a57636f93f6.tar.bz2
Bug 432521 - NPE in STSymbolManager#cleanup() refs/changes/89/24789/4
Change-Id: I81d93e80c115a1b224dd988cbcdd60a9dcbf3bdd Signed-off-by: Greg Watson <g.watson@computer.org> Reviewed-on: https://git.eclipse.org/r/24789 Reviewed-by: Xavier Raynaud <xavier.raynaud@kalray.eu> Tested-by: Hudson CI Reviewed-by: Alexander Kurtakov <akurtako@redhat.com> Tested-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/utils/STSymbolManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/utils/STSymbolManager.java b/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/utils/STSymbolManager.java
index 9f96c4b..0d22fe5 100644
--- a/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/utils/STSymbolManager.java
+++ b/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/utils/STSymbolManager.java
@@ -140,8 +140,10 @@ public class STSymbolManager {
AutoDisposeAddr2line ada2l = entry.getValue();
long diff = currentTime - ada2l.startTime;
if (diff > AUTO_DISPOSE_TIMEOUT) {
- ada2l.addr2line.dispose();
- ada2l.addr2line = null;
+ if (ada2l.addr2line != null) {
+ ada2l.addr2line.dispose();
+ ada2l.addr2line = null;
+ }
iter.remove();
}
}