Fix few wasm-c-api python binding issues (#2029)

How to python language binding test cases:
```
$ cd <wamr_dir>/language-bindings/python
$ python -m pip install -e .
$ cd wasm-c-api
$ python -m unittest tests/test_basic.py
$ python -m unittest tests/test_advanced.py
```
This commit is contained in:
liang.he
2023-03-15 12:34:34 +08:00
committed by GitHub
parent 05d7ec30b1
commit 915b4d2a89
2 changed files with 5 additions and 3 deletions

View File

@ -1905,7 +1905,7 @@ wasm_trap_new_internal(wasm_store_t *store,
}
/* fill in message */
if (strlen(error_info) > 0) {
if (error_info && strlen(error_info) > 0) {
if (!(trap->message = malloc_internal(sizeof(wasm_byte_vec_t)))) {
goto failed;
}