1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +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:
Martin Oberhuber 2006-08-09 09:39:22 +00:00
parent d8e53e6b2f
commit 3d3460f63f

View file

@ -674,9 +674,12 @@ public class SystemCommandsViewPart
if (cmds == null || cmds.length == 0)
{
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]);
}
}
}
}