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/DistortedNode.java
443 443
    {
444 444
    long id = effects.getID();
445 445
    DistortedNode node;
446
    boolean detached= false;
446 447

  
447 448
    for(int i=0; i<mNumChildren[0]; i++)
448 449
      {
......
450 451

  
451 452
      if( node.mEffects.getID()==id )
452 453
        {
454
        detached=true;
453 455
        DistortedAttachDaemon.detach(this,node);
454 456
        break;
455 457
        }
456 458
      }
459

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

  
459 468
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff