summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/elf
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-01 04:24:45 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-01 04:24:45 -0600
commit85a3c08c0496a22a01ea12aff9fdc959356e8b37 (patch)
treecd66809bd98fbdbaf3ececf4ecb5f6beb8247c85 /kfile-plugins/elf
parent68fe6bbf614756c3371082501a0eace6a285ad5e (diff)
downloadtdelibs-85a3c08c0496a22a01ea12aff9fdc959356e8b37.tar.gz
tdelibs-85a3c08c0496a22a01ea12aff9fdc959356e8b37.zip
Fix potential crash
Diffstat (limited to 'kfile-plugins/elf')
-rw-r--r--kfile-plugins/elf/kfile_elf.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/kfile-plugins/elf/kfile_elf.cpp b/kfile-plugins/elf/kfile_elf.cpp
index f816cdb35..73c30203c 100644
--- a/kfile-plugins/elf/kfile_elf.cpp
+++ b/kfile-plugins/elf/kfile_elf.cpp
@@ -135,15 +135,17 @@ bool KElfPlugin::readInfo( KFileMetaInfo& info, uint what)
{
// Failed to obtain a list of ELF icons
}
- while((entry = get_nexticon(&icons, entry)) != NULL)
- {
- if (iconListing.isEmpty()) {
- iconListing = entry->name;
- }
- else {
- iconListing = iconListing.append("<p>").append(entry->name);
+ else {
+ while((entry = get_nexticon(&icons, entry)) != NULL)
+ {
+ if (iconListing.isEmpty()) {
+ iconListing = entry->name;
+ }
+ else {
+ iconListing = iconListing.append("<p>").append(entry->name);
+ }
+ break;
}
- break;
}
if (iconListing.isEmpty()) {
iconListing = TQString("<i>") + i18n("not set") + TQString("</i>");