Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-05-25 09:17:14 +0000
committerUwe Stieber2012-05-25 09:17:14 +0000
commitc43ff2700cbc527f99e29eefe83f4586a4c2258e (patch)
tree483a85c908377cb05776c68fc06de57bb7f88e85 /target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher
parentcd822fb9e1041dbd02071a04b2b7963ac98be248 (diff)
downloadorg.eclipse.tcf-c43ff2700cbc527f99e29eefe83f4586a4c2258e.tar.gz
org.eclipse.tcf-c43ff2700cbc527f99e29eefe83f4586a4c2258e.tar.xz
org.eclipse.tcf-c43ff2700cbc527f99e29eefe83f4586a4c2258e.zip
Target Explorer: Fix more findbugs warnings
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher/ScriptLauncher.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher/ScriptLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher/ScriptLauncher.java
index a16b2ad43..3cbde1f2d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher/ScriptLauncher.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher/ScriptLauncher.java
@@ -139,7 +139,9 @@ public class ScriptLauncher extends PlatformObject implements IScriptLauncher {
*/
@Override
public void onChannelClosed(Throwable error) {
- if (traceListener != null) { ((AbstractChannel)ScriptLauncher.this.channel).removeTraceListener(traceListener); traceListener = null; }
+ if (traceListener != null && ScriptLauncher.this.channel != null) {
+ ((AbstractChannel)ScriptLauncher.this.channel).removeTraceListener(traceListener); traceListener = null;
+ }
if (error != null) {
IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
NLS.bind(Messages.ScriptLauncher_error_channelConnectFailed, peer.getID(), error.getLocalizedMessage()),
@@ -320,7 +322,7 @@ public class ScriptLauncher extends PlatformObject implements IScriptLauncher {
Token token = tokens[index];
- IService service = channel.getRemoteService(token.getServiceName());
+ IService service = channel != null ? channel.getRemoteService(token.getServiceName()) : null;
if (service != null) {
new Command(channel, service, token.getCommandName(), token.getArguments()) {

Back to the top