forked from Ivasoft/DSView
fix: MathTrace used bad channel pointer, so cracked
This commit is contained in:
@@ -1480,8 +1480,9 @@ namespace pv
|
||||
assert(dsoSig1);
|
||||
assert(dsoSig2);
|
||||
|
||||
auto math_stack = new data::MathStack(this, dsoSig1, dsoSig2, type);
|
||||
DESTROY_OBJECT(_math_trace);
|
||||
|
||||
auto math_stack = new data::MathStack(this, dsoSig1, dsoSig2, type);
|
||||
_math_trace = new view::MathTrace(enable, math_stack, dsoSig1, dsoSig2);
|
||||
|
||||
if (_math_trace && _math_trace->enabled())
|
||||
@@ -2079,7 +2080,9 @@ namespace pv
|
||||
}
|
||||
|
||||
void SigSession::clear_signals()
|
||||
{
|
||||
{
|
||||
DESTROY_OBJECT(_math_trace);
|
||||
|
||||
for (int i=0; i< (int)_signals.size(); i++)
|
||||
{
|
||||
auto *p = _signals[i];
|
||||
|
||||
@@ -76,11 +76,13 @@ void MathTrace::set_enable(bool enable)
|
||||
|
||||
int MathTrace::src1()
|
||||
{
|
||||
assert(_dsoSig1);
|
||||
return _dsoSig1->get_index();
|
||||
}
|
||||
|
||||
int MathTrace::src2()
|
||||
{
|
||||
{
|
||||
assert(_dsoSig2);
|
||||
return _dsoSig2->get_index();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user