Commit 670e4e70 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

Timeline: Don't crash if creatorTheme() is not available



Change-Id: Ie269aa9542d0f607d475edbbd83de56ad71c6701
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
parent 83eb076e
......@@ -243,9 +243,10 @@ void NotesMaterialShader::updateState(const RenderState &state, QSGMaterial *, Q
if (state.isMatrixDirty()) {
program()->setUniformValue(m_matrix_id, state.combinedMatrix());
program()->setUniformValue(m_z_range_id, GLfloat(1.0));
program()->setUniformValue(
m_color_id,
Utils::creatorTheme()->color(Utils::Theme::Timeline_HighlightColor));
const QColor notesColor = Utils::creatorTheme()
? Utils::creatorTheme()->color(Utils::Theme::Timeline_HighlightColor)
: QColor(255, 165, 0);
program()->setUniformValue(m_color_id, notesColor);
}
}
......
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