Since `new_thread_func` can be called before other ecalls like `t_sgxssl_call_apis`, function pointer `func` can be still `nullptr` when it's called. [See here](https://github.com/intel/intel-sgx-ssl/blob/d09faa217391be33af8843bdaab271efe6277f19/Linux/sgx/test_app/enclave/tests/threadstest.c#L123)