Skip to content

Commit da3d2ee

Browse files
committed
1.2.1
Forcefully kill process
1 parent 66537d9 commit da3d2ee

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/io/github/thistestuser/DeobfuscatorFrame.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
public class DeobfuscatorFrame
3030
{
31-
private static final String VERSION = "1.2";
31+
private static final String VERSION = "1.2.1";
3232
private JFrame frame;
3333
private JTextField deobfuscatorField;
3434
private File deobfuscatorPath;
@@ -41,6 +41,7 @@ public class DeobfuscatorFrame
4141
private JList<String> selectedTransformersJList;
4242
private DefaultListModel<String> librariesList;
4343
private File libraryPath;
44+
private Process process;
4445

4546
/**
4647
* Launch the application.
@@ -532,6 +533,7 @@ protected Void doInBackground() throws Exception
532533
{
533534
builder.redirectErrorStream(true);
534535
Process process = builder.start();
536+
DeobfuscatorFrame.this.process = process;
535537
BufferedReader reader = new BufferedReader(
536538
new InputStreamReader(process.getInputStream()));
537539
String line;
@@ -558,6 +560,11 @@ public void windowClosing(WindowEvent e)
558560
{
559561
btnRun.setEnabled(true);
560562
worker.cancel(true);
563+
if(process != null)
564+
{
565+
process.destroyForcibly();
566+
process = null;
567+
}
561568
e.getWindow().dispose();
562569
}
563570
});

0 commit comments

Comments
 (0)