Project

General

Profile

« Previous | Next » 

Revision 8baa1fe6

Added by Leszek Koltunski about 7 years ago

When detaching Nodes, do make sure we also cancel any ATTACH jobs that might be pending.

View differences:

src/main/java/org/distorted/library/DistortedOutputSurface.java
448 448
    {
449 449
    long id = effects.getID();
450 450
    DistortedNode node;
451
    boolean detached = false;
451 452

  
452 453
    for(int i=0; i<mNumChildren; i++)
453 454
      {
......
455 456

  
456 457
      if( node.getEffects().getID()==id )
457 458
        {
459
        detached = true;
458 460
        DistortedAttachDaemon.detach(this,node);
459 461
        break;
460 462
        }
461 463
      }
464

  
465
    if( !detached )
466
      {
467
      // if we failed to detach any, it still might be the case that
468
      // there's a job in Daemon's queue that we need to cancel.
469
      DistortedAttachDaemon.cancelAttachJobs(this,effects);
470
      }
462 471
    }
463 472

  
464 473
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff