1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

check for null.

This commit is contained in:
Alain Magloire 2002-08-21 15:28:06 +00:00
parent 32da273437
commit 1a8b6c2253

View file

@ -235,14 +235,16 @@ MIPlugin.getDefault().debugLog(number++ + " " + cmd.toString());
// Close the input GDB prompt // Close the input GDB prompt
try { try {
inChannel.close(); if (inChannel != null)
inChannel.close();
} catch (IOException e) { } catch (IOException e) {
} }
inChannel = null; inChannel = null;
// Close the output GDB prompt // Close the output GDB prompt
try { try {
outChannel.close(); if (outChannel != null)
outChannel.close();
} catch (IOException e) { } catch (IOException e) {
} }
// This is __needed__ to stop the txThread and eventThread. // This is __needed__ to stop the txThread and eventThread.
@ -252,8 +254,8 @@ MIPlugin.getDefault().debugLog(number++ + " " + cmd.toString());
try { try {
if (txThread.isAlive()) { if (txThread.isAlive()) {
txThread.interrupt(); txThread.interrupt();
txThread.join(cmdTimeout);
} }
txThread.join(cmdTimeout);
} catch (InterruptedException e) { } catch (InterruptedException e) {
} }
@ -261,8 +263,8 @@ MIPlugin.getDefault().debugLog(number++ + " " + cmd.toString());
try { try {
if (rxThread.isAlive()) { if (rxThread.isAlive()) {
rxThread.interrupt(); rxThread.interrupt();
rxThread.join(cmdTimeout);
} }
rxThread.join(cmdTimeout);
} catch (InterruptedException e) { } catch (InterruptedException e) {
} }
@ -270,8 +272,8 @@ MIPlugin.getDefault().debugLog(number++ + " " + cmd.toString());
try { try {
if (eventThread.isAlive()) { if (eventThread.isAlive()) {
eventThread.interrupt(); eventThread.interrupt();
eventThread.join(cmdTimeout);
} }
eventThread.join(cmdTimeout);
} catch (InterruptedException e) { } catch (InterruptedException e) {
} }