aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authoronefang2021-09-02 13:55:09 +1000
committeronefang2021-09-02 13:55:09 +1000
commit1a84d5877d4549f71ff44b8dbb1895eb38b36eee (patch)
treef2a09f966ba39c564cde52d4ab733721e7def71f /src
parentCreate the OpenSim specific directories as well, and web. (diff)
downloadopensim-SC-1a84d5877d4549f71ff44b8dbb1895eb38b36eee.zip
opensim-SC-1a84d5877d4549f71ff44b8dbb1895eb38b36eee.tar.gz
opensim-SC-1a84d5877d4549f71ff44b8dbb1895eb38b36eee.tar.bz2
opensim-SC-1a84d5877d4549f71ff44b8dbb1895eb38b36eee.tar.xz
Don't free a LuaTree if it doesn't exist.
Diffstat (limited to 'src')
-rw-r--r--src/sledjchisl/sledjchisl.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index 8939e2b..23f47a1 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -957,17 +957,20 @@ void freeLuaTree(qtreetbl_t *tree)
957{ 957{
958 qtreetbl_obj_t obj0; 958 qtreetbl_obj_t obj0;
959 959
960 memset((void*)&obj0, 0, sizeof(obj0)); // must be cleared before call 960 if(tree)
961 tree->lock(tree); // lock it when thread condition is expected
962 while(tree->getnext(tree, &obj0, false) == true)
963 { 961 {
964 qLua *q0 = obj0.data; 962 memset((void*)&obj0, 0, sizeof(obj0)); // must be cleared before call
963 tree->lock(tree); // lock it when thread condition is expected
964 while(tree->getnext(tree, &obj0, false) == true)
965 {
966 qLua *q0 = obj0.data;
965 967
966 if (LUA_TTABLE == q0->type) 968 if (LUA_TTABLE == q0->type)
967 freeLuaTree(q0->v.t); 969 freeLuaTree(q0->v.t);
970 }
971 tree->unlock(tree);
972 tree->free(tree);
968 } 973 }
969 tree->unlock(tree);
970 tree->free(tree);
971} 974}
972 975
973 976