bzfs crash on exit

NOTE: this is an informal bug post place ONLY. Real bugs should be posted on GitHub
Post Reply
matelich
Private First Class
Private First Class
Posts: 18
Joined: Mon Jan 23, 2006 9:32 pm
Location: spokane, wa

bzfs crash on exit

Post by matelich »

Love the tails on the bullets. Just jumped from May to latest code, lots of fun stuff.

I don't know if my configuration specifically was causing the crash, but this fixes it (erase returns the iter after listIt, so effectively already incremented for you).

I assume this is fine for such a small change, do you use the sf.net patch tool otherwise?

Code: Select all

c:\Users\tom\code\bz\bzflag\bzflag>svn diff src
Index: src/bzfs/WorldEventManager.cxx
===================================================================
--- src/bzfs/WorldEventManager.cxx      (revision 20236)
+++ src/bzfs/WorldEventManager.cxx      (working copy)
@@ -83,7 +83,8 @@
         listIt = evList.erase(listIt);
         foundOne = true;
       }
-      listIt++;
+      else
+         listIt++;
     }
   }
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Re: bzfs crash on exit

Post by trepan »

Thank you for the patch.

Code: Select all

r20250 | trepan | 2009-07-21 03:20:08 -0300 (Tue, 21 Jul 2009) | 3 lines
* patch by 'matelich' to fix a bzfs exit crash, forum post:
  http://my.bzflag.org/bb/viewtopic.php?f=32&t=14505&p=140451
Post Reply