mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-11 19:04:05 +02:00
Fix renderer crashing due to SimulationData not being instantiated early enough
This commit is contained in:
@@ -22,6 +22,8 @@ int main(int argc, char *argv[])
|
|||||||
auto inputFilename = ByteString(argv[1]);
|
auto inputFilename = ByteString(argv[1]);
|
||||||
auto outputFilename = ByteString(argv[2]) + ".png";
|
auto outputFilename = ByteString(argv[2]) + ".png";
|
||||||
|
|
||||||
|
auto simulationData = std::make_unique<SimulationData>();
|
||||||
|
|
||||||
std::vector<char> fileData;
|
std::vector<char> fileData;
|
||||||
if (!Platform::ReadFile(fileData, inputFilename))
|
if (!Platform::ReadFile(fileData, inputFilename))
|
||||||
{
|
{
|
||||||
@@ -40,7 +42,6 @@ int main(int argc, char *argv[])
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto simulationData = std::make_unique<SimulationData>();
|
|
||||||
Simulation * sim = new Simulation();
|
Simulation * sim = new Simulation();
|
||||||
Renderer * ren = new Renderer(sim);
|
Renderer * ren = new Renderer(sim);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user