Code defects in Plasma

Alex Merry kde at randomguy3.me.uk
Mon Sep 22 20:14:02 CEST 2008


On Monday 22 September 2008 11:40:14 Ivan Čukić wrote:
> > - amarok/src/context/plasma/animator.cpp:291
> > Division by 0 if frames < 3
>
> issue1.diff attached

No-brainer.

>
> > - amarok/src/context/plasma/containment.cpp:991
> > Line 986 indicates that focusedApplet can be NULL. But focusedApplet is
> > equal to applet. Therefore applet can be NULL here.
>
> This is in ContainmentPrivate::focusApplet (not line 986 anymore)
> issue2.diff attached

I don't see why the focusedApplet guard is needed in the first place, unless 
there's some possibility of getting a 0-pointer in the applets list.  And 
there's plenty of other code that assumes it doesn't.  So I think the guard 
should go.

Alex


-- 
Proud KDE hacker: http://www.kde.org
Get KDE 4.1 - out now!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080922/8d003e4b/attachment.sig 


More information about the Plasma-devel mailing list