[KPhotoAlbum] patch: crash, if no video kpart found
Jesper K. Pedersen
blackie at blackie.dk
Mon Nov 27 07:33:40 GMT 2006
Good catch.
Thanks.
On Wednesday 15 November 2006 19:13, Henner Zeller wrote:
| Hi,
| If there are no KParts found to display videos, KPA crashes, because
| _playerPart is never initialized. Reason: etype is initialized with
| NoError .. which it still is after the loop through zero parts.
| In addition to that, the actual error was never displayed but always
| NoWidget.
|
| cheers,
| -henner
|
| --- Viewer/VideoDisplay.cpp (revision 605173)
| +++ Viewer/VideoDisplay.cpp (working copy)
| @@ -99,7 +99,7 @@
|
| KServiceTypeProfile::OfferList services =
| KServiceTypeProfile::offers(mimeType,
| QString::fromLatin1("KParts/ReadOnlyPart"));
|
| - ErrorType etype = NoError;
| + ErrorType etype = NoKPart;
|
| for( KServiceTypeProfile::OfferList::Iterator it =
| services.begin(); it != services.end(); ++it ) {
|
| @@ -136,7 +136,7 @@
| break;
| }
| if (etype != NoError) {
| - showError(NoWidget, info->fileName(), mimeType );
| + showError(etype, info->fileName(), mimeType );
| return false;
| }
| _playerPart->openURL(info->fileName());
--
Having trouble finding a given image in your collection containing
thousands of images?
http://www.kphotoalbum.org might be the answer.
More information about the Kphotoalbum
mailing list