Lock m_renderMain in Grapher::TryInitializeGraph to avoid modifying m_graph during rendering (#1430)
This commit is contained in:
parent
483dacbeff
commit
296cf038b9
@ -1085,7 +1085,6 @@ void Grapher::OnGraphBackgroundPropertyChanged(Windows::UI::Color /*oldValue*/,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Grapher::OnGridLinesColorPropertyChanged(Windows::UI::Color /*oldValue*/, Windows::UI::Color newValue)
|
||||
{
|
||||
if (m_renderMain != nullptr && m_graph != nullptr)
|
||||
@ -1113,6 +1112,7 @@ void Grapher::OnLineWidthPropertyChanged(double oldValue, double newValue)
|
||||
|
||||
optional<vector<shared_ptr<Graphing::IEquation>>> Grapher::TryInitializeGraph(bool keepCurrentView, const IExpression* graphingExp)
|
||||
{
|
||||
critical_section::scoped_lock lock(m_renderMain->GetCriticalSection());
|
||||
if (keepCurrentView || IsKeepCurrentView)
|
||||
{
|
||||
auto renderer = m_graph->GetRenderer();
|
||||
|
Loading…
Reference in New Issue
Block a user