add null check to isProcessRunning() in new ShellService

This commit is contained in:
idk
2022-01-22 00:12:37 -05:00
parent 77e30e246d
commit 3e8f8a2bd3

View File

@@ -91,7 +91,7 @@ public class ShellService implements ClientApp {
_pb.redirectOutput(_outputLog);
_pb.redirectError(_errorLog);
_pb.directory(pluginDir);
changeState(ClientAppState.INITIALIZED, "ShellService: " + getName() + " set up and initialized");
changeState(ClientAppState.INITIALIZED, "ShellService: " + getName() + " setup and initialized");
}
private String[] trimArgs(String[] args) {
@@ -189,6 +189,8 @@ public class ShellService implements ClientApp {
* not running
*/
public boolean isProcessRunning() {
if (_p == null)
return false;
if (_log.shouldLog(Log.DEBUG))
_log.debug("Checking process status " + getName() + _p.isAlive());
return _p.isAlive();