Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 07f92da8f058
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4a7333c6e599
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 19, 2021

  1. Fixed bug causing reference to the current trigger channel to be rele…

    …ased before the new trigger was configured
    azonenberg committed May 19, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4a7333c View commit details
Showing with 7 additions and 3 deletions.
  1. +7 −3 scopehal/Oscilloscope.h
10 changes: 7 additions & 3 deletions scopehal/Oscilloscope.h
Original file line number Diff line number Diff line change
@@ -416,13 +416,17 @@ class Oscilloscope : public virtual Instrument
*/
void SetTrigger(Trigger* trigger)
{
//If we have an old trigger that's not the same, free it
if(m_trigger != trigger)
delete m_trigger;
Trigger* old_trig = m_trigger;

//Set the new trigger and sync to hardware
m_trigger = trigger;
PushTrigger();

//Delete old trigger *after* pushing the new one.
//This prevents possible race conditions where we disable the current trigger channel before the new
//trigger is set.
if(old_trig != trigger)
delete old_trig;
}

/**