Commit f717ff8d authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

FIx possible startup crash

parent d765c0b9
......@@ -644,6 +644,11 @@ void GLWidget::updateRulerHeight(int addedHeight)
resizeGL(width(), height());
}
bool GLWidget::isReady() const
{
return m_consumer != nullptr;
}
void GLWidget::requestSeek(int position)
{
m_consumer->set("scrub_audio", 1);
......
......@@ -140,6 +140,8 @@ public:
void purgeCache();
/** @brief Show / hide monitor ruler */
void switchRuler(bool show);
/** @brief Returns true if consumer is initialized */
bool isReady() const;
protected:
void mouseReleaseEvent(QMouseEvent *event) override;
......
......@@ -1421,6 +1421,9 @@ void Monitor::forceMonitorRefresh()
void Monitor::refreshMonitorIfActive(bool directUpdate)
{
if (!m_glMonitor->isReady()) {
return;
}
if (isActive()) {
if (directUpdate) {
m_glMonitor->refresh();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment