mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Catch potential nullpointer exceptions.
This commit is contained in:
parent
a02276b6ee
commit
5bd17656da
1 changed files with 9 additions and 1 deletions
|
@ -97,6 +97,9 @@ public class CTarget implements ICDITarget {
|
|||
try {
|
||||
mi.postCommand(select);
|
||||
MIThreadSelectInfo info = select.getMIThreadSelectInfo();
|
||||
if (info == null) {
|
||||
throw new CDIException("No Answer");
|
||||
}
|
||||
currentThreadId = info.getNewThreadId();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
|
@ -171,7 +174,12 @@ public class CTarget implements ICDITarget {
|
|||
//MIThreadListIdsInfo info = tids.getMIThreadListIdsInfo();
|
||||
mi.postCommand(tids);
|
||||
MIInfoThreadsInfo info = tids.getMIInfoThreadsInfo();
|
||||
int[] ids = info.getThreadIds();
|
||||
int [] ids;
|
||||
if (info == null) {
|
||||
ids = new int[0];
|
||||
} else {
|
||||
ids = info.getThreadIds();
|
||||
}
|
||||
if (ids != null && ids.length > 0) {
|
||||
cthreads = new CThread[ids.length];
|
||||
// Ok that means it is a multiThreaded.
|
||||
|
|
Loading…
Add table
Reference in a new issue