Summary: | kasteroids segfaults sometimes when using shields | ||
---|---|---|---|
Product: | [Unmaintained] kasteroids | Reporter: | Todd Kirby <doubleshot> |
Component: | general | Assignee: | Martin R. Jones <mjones> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 2.2 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
fix powerup collision detection problem
Backtrace of kasteroids collision segfault |
Description
Todd Kirby
2003-11-30 10:16:29 UTC
Created attachment 3471 [details]
fix powerup collision detection problem
diff to kasteroids/view.cpp in kde version 3.1.4
Created attachment 3480 [details]
Backtrace of kasteroids collision segfault
Qt: 3.2.3
KDE: 3.1.4
KAsteroids: 2.2
CVS commit by waba: Fix crash when both shield and ship hit powerup at same time. (BR69324) CCMAIL: 69324-done@bugs.kde.org M +4 -2 view.cpp 1.40.2.1 --- kdegames/kasteroids/view.cpp #1.40:1.40.2.1 @@ -783,7 +783,7 @@ void KAsteroidsView::processPowerups() QPtrListIterator<KPowerup> it( powerups ); - for( ; it.current(); ++it ) + for( ; (pup = it.current()); ) { - pup = it.current(); + ++it; // We have to increase here, because pup may get deleted. pup->growOlder(); @@ -828,4 +828,5 @@ void KAsteroidsView::processPowerups() powerups.removeRef( pup ); vitalsChanged = true; + break; } @@ -835,4 +836,5 @@ void KAsteroidsView::processPowerups() { powerups.removeRef( pup ); + break; } } |