[Kde-games-devel] [Patch] Fix crash in kolf

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Mon Dec 24 11:22:52 CET 2007


Albert Astals Cid schrieb:
> A Diumenge 23 Desembre 2007, Christian Ehrlicher va escriure:
>> Hi,
>>
>> I found a crash in kolf and also fixed the problem for. But I'm unsure
>> if this is the crrect fix.
>>
>> How to reproduce: Start a new game, hit the ball at least once (to make
>> sure Ball::collisionDetect() is called). End the game and stat a new
>> one. The next time you hit the ball, you'll get a crash because
>> 'QGraphicsEllipseItem* halo' is != 0 but already deleted.
>> halo is deleted when it's parent is destroyed but the variable is not
>> reset to 0.
>> For me it looks like the static is not needed at all.
> 
> It seems to be somewhat an optimization not to create the hallo each time
But it is (without my patch) - therefore the static is useless.


Christian


More information about the kde-games-devel mailing list