son't try to select non-existent notes after editing (and thus crash).
[ardour.git] / gtk2_ardour / meter_patterns.cc
index 1b582a96b065cdbaf9c09ff13ffee51641598b2c..5db4482adc1e3cc708e9da3c05d59558c1fe588f 100644 (file)
 #include <gtkmm2ext/utils.h>
 #include <gtkmm2ext/rgb_macros.h>
 
+#include "ardour/logmeter.h"
 #include <ardour/rc_configuration.h>
+
 #include "utils.h"
-#include "logmeter.h"
 #include "meter_patterns.h"
 #include "ui_config.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace ARDOUR;
 using namespace ARDOUR_UI_UTILS;
@@ -1010,6 +1011,11 @@ meter_render_metrics (Gtk::Widget& w, MeterType type, vector<DataType> types)
                                layout->set_text("mid");
                                layout->get_pixel_size(tw, th);
                                break;
+                       default: // DataType::NIL;
+                               layout->set_text("");
+                               tw = th = 0;
+                               assert (0); // not reached
+                               break;
                }
                if (!background) {
                        c = w.get_style()->get_fg (Gtk::STATE_ACTIVE);