mirror of
https://github.com/processing/processing4.git
synced 2026-01-30 03:41:15 +01:00
Fix restarting sketch in Debug mode when Run is pressed
Disconnect event of the old VM would arrive after the new VM was created, closing it instantly and leaving user without a running sketch.
This commit is contained in:
@@ -533,6 +533,12 @@ public class Debugger {
|
||||
* @param es Incoming set of events from VM
|
||||
*/
|
||||
public synchronized void vmEvent(EventSet es) {
|
||||
VirtualMachine vm = vm();
|
||||
if (vm != null && vm != es.virtualMachine()) {
|
||||
// This is no longer VM we are interested in,
|
||||
// we already cleaned up and run different VM now.
|
||||
return;
|
||||
}
|
||||
for (Event e : es) {
|
||||
log("*** VM Event: " + e);
|
||||
if (e instanceof VMStartEvent) {
|
||||
|
||||
Reference in New Issue
Block a user