mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-24 08:52:51 +02:00
Fix crash if any built-in scripts try to use the interface api
We don't have any scripts like this and never will. But if we did, this would fix the crash.
This commit is contained in:
@@ -191,7 +191,6 @@ GameController::GameController():
|
||||
|
||||
#ifdef LUACONSOLE
|
||||
commandInterface = new LuaScriptInterface(this, gameModel);
|
||||
((LuaScriptInterface*)commandInterface)->SetWindow(gameView);
|
||||
#else
|
||||
commandInterface = new TPTScriptInterface(this, gameModel);
|
||||
#endif
|
||||
|
@@ -144,6 +144,7 @@ LuaScriptInterface::LuaScriptInterface(GameController * c, GameModel * m):
|
||||
|
||||
initSimulationAPI();
|
||||
initInterfaceAPI();
|
||||
SetWindow(c->GetView());
|
||||
initRendererAPI();
|
||||
initElementsAPI();
|
||||
initGraphicsAPI();
|
||||
|
Reference in New Issue
Block a user