From c9d9205bb8641f2111166349c75362fb05c5417f Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 1 Mar 2019 12:41:37 +1100 Subject: [PATCH] [c-host] add missing pointer initialization --- c-host/windows/platform.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/c-host/windows/platform.c b/c-host/windows/platform.c index 18eeb618..8bc85a3e 100644 --- a/c-host/windows/platform.c +++ b/c-host/windows/platform.c @@ -167,10 +167,11 @@ static DWORD WINAPI threadWrapper(LPVOID lpParameter) bool os_createThread(const char * name, osThreadFunction function, void * opaque, osThreadHandle ** handle) { - *handle = (osThreadHandle *)malloc(sizeof(osThreadHandle)); - (*handle)->name = name; - (*handle)->opaque = opaque; - (*handle)->handle = CreateThread(NULL, 0, threadWrapper, *handle, 0, &(*handle)->threadID); + *handle = (osThreadHandle *)malloc(sizeof(osThreadHandle)); + (*handle)->name = name; + (*handle)->function = function; + (*handle)->opaque = opaque; + (*handle)->handle = CreateThread(NULL, 0, threadWrapper, *handle, 0, &(*handle)->threadID); if (!(*handle)->handle) {