13
0

Fix a potential(?) nullptr dereference

This commit is contained in:
Robin Gareus 2017-11-23 10:38:05 +01:00
parent 07f940016c
commit 3009fd7574

View File

@ -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 ();