Changeset 90:8d0cefd29e09 in finroc_plugins_data_ports


Ignore:
Timestamp:
05.02.2015 21:03:38 (5 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
13.10
Phase:
public
Message:

Bugfix: If value to publish for some reason (e.g. port not ready or value out of bounds) could not be assigned to publishing port, programs could under some circumstances crash.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • common/tPublishOperation.h

    r46 r90  
    9797    { 
    9898      FINROC_LOG_PRINT(WARNING, "Port is not ready. Ignoring publishing request."); 
     99      this->CheckRecycle(); 
    99100      return; 
    100101    } 
  • optimized/tCheapCopyPort.h

    r46 r90  
    488488        assert((used_locks < cADD_LOCKS) && "Too many locks in this publishing operation"); 
    489489        published_buffer->ReleaseLocks<tUnusedManagerPointer::deleter_type, tCheaplyCopiedBufferManager>(cADD_LOCKS - used_locks); 
     490        published_buffer = NULL; 
    490491      } 
    491492    } 
     
    580581        tUnusedBufferRecycler recycler; 
    581582        recycler(published_buffer); 
     583        published_buffer = NULL; 
    582584      } 
    583585    } 
Note: See TracChangeset for help on using the changeset viewer.