error checking

This commit is contained in:
Antonis Geralis 2022-12-31 20:01:51 +02:00 committed by GitHub
parent 7da7b895c5
commit 52bb5890c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,10 @@ int main(void)
if (atomic_load(&dataLoaded))
{
framesCounter = 0;
pthread_join(threadId, NULL);
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;