apply two patches by Erik Hovland

patch #823: sound::init has a return value which should be checked; 

patch #824: delete is for an array, so it needs square brackets
This commit is contained in:
Gunter Labes 2007-11-08 15:36:48 +00:00
parent 1469e005f8
commit cfa93a03a1
2 changed files with 3 additions and 2 deletions

View file

@ -399,7 +399,8 @@ void reset_sound() {
if (music || sound || bell || UI_sound) {
sound::close_sound();
sound::init_sound();
if (!sound::init_sound())
ERR_AUDIO << "Error initializing audio device: " << Mix_GetError() << "\n";
if (!music)
sound::stop_music();
if (!sound)

View file

@ -228,6 +228,6 @@ void save_image(surface surf, const std::string &filename)
//cleans everything
png_write_end(png_ptr, info_ptr);
png_destroy_write_struct(&png_ptr, &info_ptr);
delete row_pointers;
delete [] row_pointers;
}