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:
parent
1469e005f8
commit
cfa93a03a1
2 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue