Ignore:
Timestamp:
Jan 24, 2011, 3:35:20 PM (11 years ago)
Author:
sam
Message:

Print error reports before panicking when asset loads fail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sample.cpp

    r259 r280  
    1616#include <cmath>
    1717
     18#include <SDL.h>
    1819#include <SDL_mixer.h>
    1920
     
    4243    data->name = strdup(path);
    4344    data->chunk = Mix_LoadWAV(path);
     45    if (!data->chunk)
     46    {
     47#if !FINAL_RELEASE
     48        fprintf(stderr, "ERROR: could not load %s\n", path);
     49#endif
     50        SDL_Quit();
     51        exit(1);
     52    }
    4453}
    4554
Note: See TracChangeset for help on using the changeset viewer.