summaryrefslogtreecommitdiff
path: root/gtk2_ardour/fft_graph.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-11-23 10:38:05 +0100
committerRobin Gareus <robin@gareus.org>2017-11-23 10:38:05 +0100
commit3009fd75749e9bfe7ef3748eb94226b53cbbe264 (patch)
tree363349570bfe3bc3a7d7cbee163214e20c33c684 /gtk2_ardour/fft_graph.cc
parent07f940016c7ef20c221d86bed072ae69177fb096 (diff)
Fix a potential(?) nullptr dereference
Diffstat (limited to 'gtk2_ardour/fft_graph.cc')
-rw-r--r--gtk2_ardour/fft_graph.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/fft_graph.cc b/gtk2_ardour/fft_graph.cc
index 27d5b06f3e..25f6c6ff29 100644
--- a/gtk2_ardour/fft_graph.cc
+++ b/gtk2_ardour/fft_graph.cc
@@ -420,8 +420,6 @@ FFTGraph::draw_scales (cairo_t* cr)
void
FFTGraph::redraw ()
{
- Glib::Threads::Mutex::Lock lm (_a_window->track_list_lock);
-
assert (_surface);
cairo_t* cr = cairo_create (_surface);
@@ -433,6 +431,8 @@ FFTGraph::redraw ()
return;
}
+ Glib::Threads::Mutex::Lock lm (_a_window->track_list_lock);
+
if (!_a_window->track_list_ready) {
cairo_destroy (cr);
queue_draw ();