--Boundary-00=_uyVHCguL/74NGKI Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline This is especially annoying since there are those out there who ship off .pdf files that are simply renamed .ps files. (yes, I've seen it...) We shouldn't be crashing here. Only problem is that introduces an i18n, so we could either ignore the messagebox for this release, get it translated quickly, or just exit(). Comments? -- George Staikos KDE Developer http://www.kde.org/ Staikos Computing Services Inc. http://www.staikos.net/ --Boundary-00=_uyVHCguL/74NGKI Content-Type: text/x-diff; charset="us-ascii"; name="kpdf-no-crashy.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kpdf-no-crashy.patch" Index: document.cpp =================================================================== RCS file: /home/kde/kdegraphics/kpdf/core/document.cpp,v retrieving revision 1.33 diff -u -3 -p -r1.33 document.cpp --- document.cpp 12 Feb 2005 17:15:20 -0000 1.33 +++ document.cpp 24 Feb 2005 04:46:44 -0000 @@ -140,8 +140,11 @@ bool KPDFDocument::openDocument( const Q QString mimeName = mime->name(); if ( mimeName == "application/pdf" ) generator = new PDFGenerator( this ); - else if ( mimeName == "application/postscript" ) + else if ( mimeName == "application/postscript" ) { kdError() << "PS generator not available" << endl; + KMessageBox::sorry(0L, i18n("Postscript is unsupported.")); + return false; + } else { kdWarning() << "Unknown mimetype '" << mimeName << "'." << endl; --Boundary-00=_uyVHCguL/74NGKI--