diff layer/Colour3DPlotLayer.cpp @ 860:4a5d144bd5d0 tonioni

Merge from default branch
author Chris Cannam
date Tue, 09 Sep 2014 16:36:21 +0100
parents db0759e4c6c3
children 3ca3b8fbbcee
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Tue Sep 02 16:23:48 2014 +0100
+++ b/layer/Colour3DPlotLayer.cpp	Tue Sep 09 16:36:21 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) {