summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYeongJong Lee <yj34.lee@samsung.com>2018-04-23 13:39:32 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-04-23 13:39:36 -0700
commit43c3e68d2f9d74c7066a6a867a6b69e74b380027 (patch)
tree9f196fe8ebd9e06e5f693de08c46410e0626a8e3 /src
parent96ff273449ce5c97db5e9ee9e8aef4613e146cca (diff)
edje_lua2: add null check
Summary: It need to check memory allocation failures Reviewers: Jaehyun_Cho Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5971 Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/edje/edje_lua2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/edje/edje_lua2.c b/src/lib/edje/edje_lua2.c
index b8a66c67c7..b204736439 100644
--- a/src/lib/edje/edje_lua2.c
+++ b/src/lib/edje/edje_lua2.c
@@ -3964,6 +3964,11 @@ _edje_lua2_script_init(Edje *ed) // Stack usage [-63, +99, em]
3964 _elua_init(); // This is actually truly pointless, even if raster remembers. 3964 _elua_init(); // This is actually truly pointless, even if raster remembers.
3965#endif 3965#endif
3966 L = ed->L = luaL_newstate(); 3966 L = ed->L = luaL_newstate();
3967 if (!L)
3968 {
3969 ERR("Lua state assign failed");
3970 return;
3971 }
3967 al = lua_newuserdata(L, sizeof(Edje_Lua_Allocator)); 3972 al = lua_newuserdata(L, sizeof(Edje_Lua_Allocator));
3968 al->ref = luaL_ref(L, LUA_REGISTRYINDEX); 3973 al->ref = luaL_ref(L, LUA_REGISTRYINDEX);
3969 al->func = lua_getallocf(L, &(al->ud)); 3974 al->func = lua_getallocf(L, &(al->ud));