Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3092 for code/trunk/src


Ignore:
Timestamp:
May 27, 2009, 9:37:12 PM (15 years ago)
Author:
rgrieder
Message:

SoundManager.cc: alutGetMIMETypes might return NULL instead of const char* —> Display error and don't feed NULL-string or all hell might break loose.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/sound/SoundManager.cc

    r3078 r3092  
    5353        {
    5454            COUT(4) << "Sound: OpenAL ALUT version: " << alutGetMajorVersion() << "." << alutGetMinorVersion() << std::endl;
    55             COUT(4) << "Sound: OpenAL ALUT supported MIME types: " << alutGetMIMETypes(ALUT_LOADER_BUFFER) << std::endl;
     55            const char* str = alutGetMIMETypes(ALUT_LOADER_BUFFER);
     56            if (str == NULL)
     57                COUT(2) << "Sound: OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl;
     58            else
     59                COUT(4) << "Sound: OpenAL ALUT supported MIME types: " << str << std::endl;
    5660            if(SoundManager::device_s == NULL)
    5761            {
Note: See TracChangeset for help on using the changeset viewer.