Skip to content
Snippets Groups Projects
Commit b7a6773f authored by fickleheart's avatar fickleheart
Browse files

Don't error when checking patch.valid on invalid patches

parent 1d2f6c95
No related branches found
No related tags found
1 merge request!780Don't error when checking patch.valid on invalid patches
......@@ -270,8 +270,13 @@ static int patch_get(lua_State *L)
// patches are CURRENTLY always valid, expected to be cached with PU_STATIC
// this may change in the future, so patch.valid still exists
if (!patch)
if (!patch) {
if (field == patch_valid) {
lua_pushboolean(L, 0);
return 1;
}
return LUA_ErrInvalid(L, "patch_t");
}
switch (field)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment