diff view/View.h @ 277:8acd30ed735c

* Fix up and simplify the LayerTreeModel, removing a horrible memory leak * Move phase-unwrapped frequency estimation from SpectrogramLayer to FFTDataServer * Make the spectrum show peak phase-unwrapped frequencies as well (still needs work) * Start adding piano keyboard horizontal scale to spectrum * Debug output for id3 tags
author Chris Cannam
date Tue, 03 Jul 2007 12:46:18 +0000
parents 61a704654497
children 9dd432665059
line wrap: on
line diff
--- a/view/View.h	Mon Jul 02 14:58:34 2007 +0000
+++ b/view/View.h	Tue Jul 03 12:46:18 2007 +0000
@@ -150,7 +150,9 @@
      * Return a layer, counted in stacking order.  That is, layer 0 is
      * the bottom layer and layer "getLayerCount()-1" is the top one.
      */
-    virtual Layer *getLayer(int n) { return m_layers[n]; }
+    virtual Layer *getLayer(int n) {
+        if (n < m_layers.size()) return m_layers[n]; else return 0;
+    }
 
     /**
      * Return the top layer.  This is the same as