From b086d33937d3cb593dbcea2dc27b68f1c3521a90 Mon Sep 17 00:00:00 2001 From: nick_m Date: Fri, 9 Jun 2017 01:56:28 +1000 Subject: [PATCH] TempoLines deletes its bfc on destruction --- gtk2_ardour/tempo_lines.cc | 6 ++++++ gtk2_ardour/tempo_lines.h | 1 + 2 files changed, 7 insertions(+) diff --git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc index ff7b8ad529..cdbde54961 100644 --- a/gtk2_ardour/tempo_lines.cc +++ b/gtk2_ardour/tempo_lines.cc @@ -36,6 +36,12 @@ TempoLines::TempoLines (ArdourCanvas::Container* group, double, ARDOUR::BeatsFra lines.set_extent (ArdourCanvas::COORD_MAX); } +TempoLines::~TempoLines () +{ + delete _bfc; + _bfc = 0; +} + void TempoLines::tempo_map_changed() { diff --git a/gtk2_ardour/tempo_lines.h b/gtk2_ardour/tempo_lines.h index 7425f6aae3..be5e1315c9 100644 --- a/gtk2_ardour/tempo_lines.h +++ b/gtk2_ardour/tempo_lines.h @@ -27,6 +27,7 @@ class TempoLines { public: TempoLines (ArdourCanvas::Container* group, double screen_height, ARDOUR::BeatsFramesConverter* bfc); + ~TempoLines (); void tempo_map_changed();