Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 1cd104eb authored by Laurent Montel's avatar Laurent Montel 😁

Fix crash when id is not defined

parent 6de63004
......@@ -31,7 +31,6 @@
#include "mapi.h"
#include <QtCore/QMap>
#include <klocalizedstring.h>
//@cond IGNORE
static struct
{
......@@ -224,19 +223,19 @@ QString mapiTagString( int key )
QString mapiNamedTagString( int key, int tag )
{
if ( MAPI_NamedTagMap.count() == 0 ) {
for ( int i=0; MAPI_NamedTagStrings[ i ].str; i++ ) {
for ( int i=0; MAPI_NamedTagStrings[ i ].str; ++i ) {
MAPI_NamedTagMap[ MAPI_NamedTagStrings[ i ].tag ] =
i18n( MAPI_NamedTagStrings[ i ].str );
}
}
QMap<int,QString>::ConstIterator it = MAPI_NamedTagMap.constFind( key );
if ( it == MAPI_NamedTagMap.constEnd() ) {
if ( it != MAPI_NamedTagMap.constEnd() ) {
if ( tag >= 0 ) {
return QString().sprintf( "0x%04X [0x%04X]: ", tag, key ) + *it;
} else {
return QString().sprintf( "0x%04X ________:", key ) + *it;
}
} else {
return *it;
return QString().sprintf( "0x%04X ________:", key );
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment