summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--examples/core/core_loading_thread.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/core/core_loading_thread.c b/examples/core/core_loading_thread.c
index 09ec7646..5ab8bbc3 100644
--- a/examples/core/core_loading_thread.c
+++ b/examples/core/core_loading_thread.c
@@ -72,6 +72,10 @@ int main(void)
if (atomic_load(&dataLoaded))
{
framesCounter = 0;
+ int error = pthread_join(threadId, NULL);
+ if (error != 0) TraceLog(LOG_ERROR, "Error joining loading thread");
+ else TraceLog(LOG_INFO, "Loading thread terminated successfully");
+
state = STATE_FINISHED;
}
} break;