Fix renderer crashing due to SimulationData not being instantiated early enough

This commit is contained in:
jacob1 2024-03-17 23:05:31 -04:00
parent 8452d96bf6
commit 3fb356e2a9
No known key found for this signature in database
GPG Key ID: 4E58A32D510E1995

View File

@ -22,6 +22,8 @@ int main(int argc, char *argv[])
auto inputFilename = ByteString(argv[1]);
auto outputFilename = ByteString(argv[2]) + ".png";
auto simulationData = std::make_unique<SimulationData>();
std::vector<char> fileData;
if (!Platform::ReadFile(fileData, inputFilename))
{
@ -40,7 +42,6 @@ int main(int argc, char *argv[])
throw e;
}
auto simulationData = std::make_unique<SimulationData>();
Simulation * sim = new Simulation();
Renderer * ren = new Renderer(sim);