From kde-commits Tue Feb 13 03:45:20 2007 From: Allen Winter Date: Tue, 13 Feb 2007 03:45:20 +0000 To: kde-commits Subject: branches/KDE/3.5/kdepim/kmail Message-Id: <1171338320.551043.2034.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=117136392829867 SVN commit 633071 by winterz: merge SVN commit 632062 by adridg: After updating KMail and throwing away index files, I encountered a file which has charset= set, and that triggered a QGList warning when subscripting an empty string; adding this extra check for empty charsets stops crashing after that warning. M +1 -2 kmfoldermaildir.cpp --- branches/KDE/3.5/kdepim/kmail/kmfoldermaildir.cpp #633070:633071 @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -734,7 +733,7 @@ int cidx = contentTypeStr.find( "charset=" ); if ( cidx != -1 ) { charset = contentTypeStr.mid( cidx + 8 ); - if ( charset[0] == '"' ) { + if ( !charset.isEmpty() && ( charset[0] == '"' ) ) { charset = charset.mid( 1 ); } cidx = 0;