Fix null pointer crash when lua script fails to load.
This commit is contained in:
parent
717153ac19
commit
349aed4aaf
|
@ -6015,7 +6015,8 @@ int FCEU_LoadLuaCode(const char *filename, const char *arg) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Wipe the stack. Our thread
|
// Wipe the stack. Our thread
|
||||||
lua_settop(L,0);
|
if (L)
|
||||||
|
lua_settop(L,0);
|
||||||
return 0; // Oh shit.
|
return 0; // Oh shit.
|
||||||
}
|
}
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
Loading…
Reference in New Issue