diff options
Diffstat (limited to 'core/src/xmake/process/open.c')
| -rwxr-xr-x | core/src/xmake/process/open.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/src/xmake/process/open.c b/core/src/xmake/process/open.c index 2a2ee99af..55d4fab0b 100755 --- a/core/src/xmake/process/open.c +++ b/core/src/xmake/process/open.c @@ -78,9 +78,8 @@ tb_int_t xm_process_open(lua_State* lua) // init process tb_process_ref_t process = tb_process_init_cmd(command, &attr); - - // save the process reference - lua_pushlightuserdata(lua, process); + if (process) lua_pushlightuserdata(lua, process); + else lua_pushnil(lua); // ok return 1; |
