handle waveform drawing thread shutdown
authorRobin Gareus <robin@gareus.org>
Tue, 1 Sep 2015 23:46:31 +0000 (01:46 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 1 Sep 2015 23:46:31 +0000 (01:46 +0200)
libs/canvas/wave_view.cc

index 609738326c78b152c9d432e651d150634667cec0..a06ec1090a10d36a78105c89ae3efb53071f4f20 100644 (file)
@@ -1526,6 +1526,11 @@ WaveView::drawing_thread ()
                        request_cond.wait (request_queue_lock);
                }
 
+               if (request_queue.empty()) {
+                       assert (g_atomic_int_get (&drawing_thread_should_quit));
+                       continue; // or break;
+               }
+
                /* remove the request from the queue (remember: the "request"
                 * is just a pointer to a WaveView object)
                 */