src/SDL_assert.c
changeset 3664 8bdc37b1a52a
parent 3662 6a0b3048f271
child 3669 46d27a9571fa
     1.1 --- a/src/SDL_assert.c	Wed Jan 13 09:48:42 2010 +0000
     1.2 +++ b/src/SDL_assert.c	Wed Jan 13 16:08:03 2010 +0000
     1.3 @@ -422,12 +422,7 @@
     1.4  
     1.5  int SDL_AssertionsInit(void)
     1.6  {
     1.7 -#if (SDL_ASSERT_LEVEL > 0)
     1.8 -    assertion_mutex = SDL_CreateMutex();
     1.9 -    if (assertion_mutex == NULL) {
    1.10 -        return -1;
    1.11 -    }
    1.12 -#endif
    1.13 +    /* this is a no-op at the moment. */
    1.14      return 0;
    1.15  }
    1.16  
    1.17 @@ -435,8 +430,10 @@
    1.18  {
    1.19  #if (SDL_ASSERT_LEVEL > 0)
    1.20      SDL_GenerateAssertionReport();
    1.21 -    SDL_DestroyMutex(assertion_mutex);
    1.22 -    assertion_mutex = NULL;
    1.23 +    if (assertion_mutex != NULL) {
    1.24 +        SDL_DestroyMutex(assertion_mutex);
    1.25 +        assertion_mutex = NULL;
    1.26 +    }
    1.27  #endif
    1.28  }
    1.29