Fix potential crash

pull/16/head
Timothy Pearson 13 years ago
parent 68fe6bbf61
commit 85a3c08c04

@ -1 +1 @@
Subproject commit 6092ca3fd1c345a94e4b634bc1a6370f735bcfd7 Subproject commit 42b03b0965a9e958b6007b49201b7793d2bd4f65

@ -135,6 +135,7 @@ bool KElfPlugin::readInfo( KFileMetaInfo& info, uint what)
{ {
// Failed to obtain a list of ELF icons // Failed to obtain a list of ELF icons
} }
else {
while((entry = get_nexticon(&icons, entry)) != NULL) while((entry = get_nexticon(&icons, entry)) != NULL)
{ {
if (iconListing.isEmpty()) { if (iconListing.isEmpty()) {
@ -145,6 +146,7 @@ bool KElfPlugin::readInfo( KFileMetaInfo& info, uint what)
} }
break; break;
} }
}
if (iconListing.isEmpty()) { if (iconListing.isEmpty()) {
iconListing = TQString("<i>") + i18n("not set") + TQString("</i>"); iconListing = TQString("<i>") + i18n("not set") + TQString("</i>");
} }

@ -674,6 +674,7 @@ TQPixmap KFileItem::pixmap( int _size, int _state ) const
{ {
// Failed to obtain a list of ELF icons // Failed to obtain a list of ELF icons
} }
else {
while((entry = get_nexticon(&icons, entry)) != NULL) while((entry = get_nexticon(&icons, entry)) != NULL)
{ {
if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") { if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") {
@ -682,6 +683,7 @@ TQPixmap KFileItem::pixmap( int _size, int _state ) const
break; break;
} }
} }
}
if (iconresnamefound == 0) { if (iconresnamefound == 0) {
// Extract the embedded icon // Extract the embedded icon

@ -222,6 +222,7 @@ TQString KURIFilterData::iconName()
{ {
// Failed to obtain a list of ELF icons // Failed to obtain a list of ELF icons
} }
else {
while((entry = get_nexticon(&icons, entry)) != NULL) while((entry = get_nexticon(&icons, entry)) != NULL)
{ {
if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") { if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") {
@ -230,6 +231,7 @@ TQString KURIFilterData::iconName()
break; break;
} }
} }
}
if (iconresnamefound == 0) { if (iconresnamefound == 0) {
// Extract the embedded icon // Extract the embedded icon

Loading…
Cancel
Save