1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-14 15:33:34 -04:00

Remove redundant ui null check in MeshcoreDemodGUI & MeshtasticDemodGUI

The ui object is created during MeshcoreDemodGUI and MeshtasticDemodGUI
construction and remains valid for the lifetime of the widget. Remove
the unnecessary null check to avoid misleading static analysis tools
into assuming ui can be null.

This resolves a Coverity false positive where the later call to
updateDechirpModeUI() was reported as a possible null dereference
in both places.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
Robin Getz
2026-07-20 23:20:15 -04:00
parent 8d5bdaee80
commit 409e1f1a00
2 changed files with 2 additions and 2 deletions
@@ -2350,7 +2350,7 @@ void MeshcoreDemodGUI::setDechirpInspectionMode(bool enabled)
{
m_dechirpSelectedMessageKey.clear();
if (m_spectrumVis && ui && ui->glSpectrum)
if (m_spectrumVis && ui->glSpectrum)
{
m_spectrumVis->setGLSpectrum(ui->glSpectrum);
@@ -2350,7 +2350,7 @@ void MeshtasticDemodGUI::setDechirpInspectionMode(bool enabled)
{
m_dechirpSelectedMessageKey.clear();
if (m_spectrumVis && ui && ui->glSpectrum)
if (m_spectrumVis && ui->glSpectrum)
{
m_spectrumVis->setGLSpectrum(ui->glSpectrum);