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:
parent
32da273437
commit
1a8b6c2253
1 changed files with 7 additions and 5 deletions
|
@ -235,6 +235,7 @@ MIPlugin.getDefault().debugLog(number++ + " " + cmd.toString());
|
||||||
|
|
||||||
// Close the input GDB prompt
|
// Close the input GDB prompt
|
||||||
try {
|
try {
|
||||||
|
if (inChannel != null)
|
||||||
inChannel.close();
|
inChannel.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
|
@ -242,6 +243,7 @@ MIPlugin.getDefault().debugLog(number++ + " " + cmd.toString());
|
||||||
|
|
||||||
// Close the output GDB prompt
|
// Close the output GDB prompt
|
||||||
try {
|
try {
|
||||||
|
if (outChannel != null)
|
||||||
outChannel.close();
|
outChannel.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue