Skip to content

Commit 2f88492

Browse files
Merge branch 'master' into master
2 parents de7e6fd + 633793a commit 2f88492

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pdlua.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ static int pdlua_object_new(lua_State *L)
13651365
* */
13661366
{
13671367
PDLUA_DEBUG("pdlua_object_new: stack top is %d", lua_gettop(L));
1368-
if (lua_islightuserdata(L, 1))
1368+
if (lua_islightuserdata(L, 1) && lua_islightuserdata(L, 2))
13691369
{
13701370
t_class *c = lua_touserdata(L, 1);
13711371
t_class *c_gfx = lua_touserdata(L, 2);
@@ -2998,8 +2998,8 @@ void pdlua_setup(void)
29982998
result = lua_pcall(__L(), 0, 0, 0);
29992999
PDLUA_DEBUG ("pdlua lua_pcall returned %d", result);
30003000
}
3001-
3002-
if (lua_load(__L(), pdlua_reader, &reader, "pd.lua", NULL) || lua_pcall(__L(), 0, 0, 0))
3001+
3002+
if (0 != result)
30033003
{
30043004
mylua_error(__L(), NULL, NULL);
30053005
pd_error(NULL, "lua: loader will not be registered!");

0 commit comments

Comments
 (0)