don't initialize the process to null

Former-commit-id: 865c0fca84
Former-commit-id: b000e8abbe150050520f2b6cabb88e54db41bafd
This commit is contained in:
idk
2022-08-21 17:34:03 -04:00
parent 8e6e55aca4
commit 78abd248d8
3 changed files with 8 additions and 13 deletions

View File

@ -395,19 +395,15 @@ public class I2PFirefox {
}
}
if (waitForProxy()){
ProcessBuilder pb = null;
ProcessBuilder pb;
if (privateWindow) {
pb = privateProcessBuilder();
} else {
pb = defaultProcessBuilder();
}
Process p = null;
try{
System.out.println(pb.command());
p = pb.start();
}catch(Exception e){
System.out.println("Error: "+e.getMessage());
}finally{
Process p = pb.start();
System.out.println("I2PFirefox");
try{
System.out.println("Waiting for I2PFirefox to close...");
@ -415,6 +411,8 @@ public class I2PFirefox {
}catch(Exception e){
System.out.println("Error: "+e.getMessage());
}
}catch(Exception e){
System.out.println("Error: "+e.getMessage());
}
}
}