Skip to content

Commit

Permalink
Fixed deadlock when exporting CSVs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Apr 5, 2022
1 parent a5d4621 commit 7e210f0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Screens/SimulatorScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,6 @@ static void DrawNumericOutputPlot(osc::SimulatorScreen::Impl& impl,
{
OSC_ASSERT(output.getOutputType() == osc::OutputType::Float);

auto guard = sim.getModel();
OpenSim::Model const& model = *guard;

ImU32 const currentTimeLineColor = ImGui::ColorConvertFloat4ToU32({1.0f, 1.0f, 0.0f, 0.6f});
ImU32 const hoverTimeLineColor = ImGui::ColorConvertFloat4ToU32({1.0f, 1.0f, 0.0f, 0.3f});

Expand All @@ -671,6 +668,8 @@ static void DrawNumericOutputPlot(osc::SimulatorScreen::Impl& impl,

std::vector<float> buf;
{
auto guard = sim.getModel();
OpenSim::Model const& model = *guard;
OSC_PERF("collect output data");
std::vector<osc::SimulationReport> reports = sim.getAllSimulationReports();
buf.resize(reports.size());
Expand Down

0 comments on commit 7e210f0

Please sign in to comment.