mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-24 17:02:55 +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
|
#ifdef LUACONSOLE
|
||||||
commandInterface = new LuaScriptInterface(this, gameModel);
|
commandInterface = new LuaScriptInterface(this, gameModel);
|
||||||
((LuaScriptInterface*)commandInterface)->SetWindow(gameView);
|
|
||||||
#else
|
#else
|
||||||
commandInterface = new TPTScriptInterface(this, gameModel);
|
commandInterface = new TPTScriptInterface(this, gameModel);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -144,6 +144,7 @@ LuaScriptInterface::LuaScriptInterface(GameController * c, GameModel * m):
|
|||||||
|
|
||||||
initSimulationAPI();
|
initSimulationAPI();
|
||||||
initInterfaceAPI();
|
initInterfaceAPI();
|
||||||
|
SetWindow(c->GetView());
|
||||||
initRendererAPI();
|
initRendererAPI();
|
||||||
initElementsAPI();
|
initElementsAPI();
|
||||||
initGraphicsAPI();
|
initGraphicsAPI();
|
||||||
|
Reference in New Issue
Block a user