extragear/multimedia/amarok/src/collection/sqlcollection

Jeff Mitchell mitchell at kde.org
Mon Jun 8 13:10:18 CEST 2009


Mark Kretschmann wrote:
> SVN commit 978819 by markey:
> 
> Don't crash when starting a collection scan after a previous scan had
> been aborted.
> 
> We destroyed the ScanManager instance when aborting the scan,
> and then never instantiated it again, ending up with a 0-pointer dereference.
> Now we reinstantiate the ScanManager automatically.
> 
> This seems the safest way to fix this issue for now. I pondered
> refactoring the code to keep the ScanManager always alive, but this
> would require major changes and seemed too risky at this point.

This seems like a drastic fix.

Why not just call ScanManager::slotError if the scan is aborted?  This
is probably what aborting the scan should have done anyways, and as far
as I can tell it will properly reset the scan manager for next time
(since that's the point of the function).

--Jeff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20090608/49eb6fe5/attachment.sig 


More information about the Amarok-devel mailing list