2
0
forked from Ivasoft/DSView

fix: MathTrace used bad channel pointer, so cracked

This commit is contained in:
dreamsourcelabTAI
2023-04-03 19:34:17 +08:00
parent ec3b38b8cf
commit 1c2f175551
2 changed files with 8 additions and 3 deletions

View File

@@ -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];

View File

@@ -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();
}