]> granicus.if.org Git - nethack/commitdiff
guard call
authornhmall <nhmall@nethack.org>
Fri, 20 Jan 2023 10:19:06 +0000 (05:19 -0500)
committernhmall <nhmall@nethack.org>
Fri, 20 Jan 2023 10:19:06 +0000 (05:19 -0500)
src/insight.c

index 5d2c715f8086b8802febbe13e87e9c8613f5d2dc..27d491aafd554982c72071edac56b3c56ea1d6e0 100644 (file)
@@ -2337,7 +2337,8 @@ record_achievement(schar achidx)
      * theme music or something. We do let the sound interface know
      * that it's not the original achievement though.
      */
-    (*soundprocs.sound_achievement)(achidx, 0, repeat_achievement);
+    if (soundprocs.sound_achievement)
+        (*soundprocs.sound_achievement)(achidx, 0, repeat_achievement);
 
     if (repeat_achievement)
         return; /* already recorded, don't duplicate it */