mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-08 17:45:24 +02:00
Fix unnecessary NPE when restoring local command shells.
No change in observed operation since the NPE would have been caught anyway, but avoiding the NPE allows easier debugging with a Java exception breakpoint on java.lang.NullPointerException
This commit is contained in:
parent
d8e53e6b2f
commit
3d3460f63f
1 changed files with 5 additions and 2 deletions
|
@ -674,9 +674,12 @@ public class SystemCommandsViewPart
|
||||||
if (cmds == null || cmds.length == 0)
|
if (cmds == null || cmds.length == 0)
|
||||||
{
|
{
|
||||||
cmds = cmdSS.restoreShellState(getShell());
|
cmds = cmdSS.restoreShellState(getShell());
|
||||||
for (int i = 0; i < cmds.length; i++)
|
if (cmds!=null)
|
||||||
{
|
{
|
||||||
updateOutput(cmds[i]);
|
for (int i = 0; i < cmds.length; i++)
|
||||||
|
{
|
||||||
|
updateOutput(cmds[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue