@@ -181,7 +181,7 @@ auto sound_load(float volume, const std::string &name, const std::string &name_a
181181 TRACE ();
182182
183183 if (m->chunk == nullptr ) {
184- if (me) {
184+ if (me != nullptr ) {
185185 thing_err (me, " cannot find sound chunk %s" , m->name_alias .c_str ());
186186 } else {
187187 ERR (" cannot find sound chunk %s" , m->name_alias .c_str ());
@@ -215,7 +215,7 @@ auto sound_load(float volume, const std::string &name, const std::string &name_a
215215
216216 auto chan = Mix_PlayChannel (-1 , m->chunk , loops);
217217 if (chan == -1 ) {
218- if (me) {
218+ if (me != nullptr ) {
219219 THING_DBG (me, " Failed to play sound %s volume %d channel %d: %s" , name_alias.c_str (), static_cast < int >(volume), chan,
220220 Mix_GetError ());
221221 } else {
@@ -229,7 +229,7 @@ auto sound_load(float volume, const std::string &name, const std::string &name_a
229229 p.volume = static_cast < int >(volume);
230230 already_playing[ chan ] = p;
231231
232- if (me) {
232+ if (me != nullptr ) {
233233 THING_DBG (me, " play sound %s volume %d channel %d" , name_alias.c_str (), static_cast < int >(volume), chan);
234234 } else {
235235 DBG (" play sound %s volume %d channel %d" , name_alias.c_str (), static_cast < int >(volume), chan);
@@ -249,7 +249,7 @@ auto sound_play(Gamep g, const std::string &name_alias, float scale, int loops,
249249 auto *sound = find_one (name_alias);
250250 if (sound == nullptr ) {
251251 if (! g_opt_tests && ! g_opt_do_level_gen && ! g_opt_do_level_select_gen && ! g_opt_do_room_gen) {
252- if (me) {
252+ if (me != nullptr ) {
253253 thing_err (me, " cannot find sound %s" , name_alias.c_str ());
254254 } else {
255255 ERR (" cannot find sound %s" , name_alias.c_str ());
0 commit comments