summaryrefslogtreecommitdiffstats
path: root/kio/kio/kfileitem.cpp
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 /kio/kio/kfileitem.cpp
parent68fe6bbf614756c3371082501a0eace6a285ad5e (diff)
downloadtdelibs-85a3c08c0496a22a01ea12aff9fdc959356e8b37.tar.gz
tdelibs-85a3c08c0496a22a01ea12aff9fdc959356e8b37.zip
Fix potential crash
Diffstat (limited to 'kio/kio/kfileitem.cpp')
-rw-r--r--kio/kio/kfileitem.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp
index e74b407be..38e3c0e3c 100644
--- a/kio/kio/kfileitem.cpp
+++ b/kio/kio/kfileitem.cpp
@@ -674,12 +674,14 @@ TQPixmap KFileItem::pixmap( int _size, int _state ) const
{
// Failed to obtain a list of ELF icons
}
- while((entry = get_nexticon(&icons, entry)) != NULL)
- {
- if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") {
- iconresnamefound = 1;
- p = DesktopIcon( entry->name, _size, _state );
- break;
+ else {
+ while((entry = get_nexticon(&icons, entry)) != NULL)
+ {
+ if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") {
+ iconresnamefound = 1;
+ p = DesktopIcon( entry->name, _size, _state );
+ break;
+ }
}
}