Mercurial > hg > svgui
changeset 843:db0759e4c6c3
Fix some (probably benign) uninitialised members (from coverity scan)
author | Chris Cannam |
---|---|
date | Wed, 03 Sep 2014 11:31:09 +0100 |
parents | 532302d04571 |
children | 5d4e3e36945f |
files | layer/Colour3DPlotLayer.cpp |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp Tue Sep 02 16:18:26 2014 +0100 +++ b/layer/Colour3DPlotLayer.cpp Wed Sep 03 11:31:09 2014 +0100 @@ -109,7 +109,7 @@ void Colour3DPlotLayer::cacheInvalid(int startFrame, int endFrame) { - if (!m_cache) return; + if (!m_cache || !m_model) return; int modelResolution = m_model->getResolution(); int start = startFrame / modelResolution; @@ -1529,7 +1529,9 @@ int sx0i = int(sx0 + epsilon); if (sx0i >= sw) break; - float a, b, value; + float a = float(sourceLine[sx0i]); + float b = a; + float value; float sx1 = sxa[x*2+1]; if (sx1 > sx0 + 1.f) {