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

Albert Astals Cid aacid at kde.org
Mon Dec 24 18:39:37 CET 2007


A Dilluns 24 Desembre 2007, Christian Ehrlicher va escriure:
> 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.

Ok, i see you did not fall into my delicate attempt of making you code the 
correct code for not creating the hallo each time :-D

Please commit, better slow than crashing.

Albert

>
>
> Christian
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel




More information about the kde-games-devel mailing list