diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-01 04:24:45 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-01 04:24:45 -0600 |
commit | 85a3c08c0496a22a01ea12aff9fdc959356e8b37 (patch) | |
tree | cd66809bd98fbdbaf3ececf4ecb5f6beb8247c85 /kio | |
parent | 68fe6bbf614756c3371082501a0eace6a285ad5e (diff) | |
download | tdelibs-85a3c08c0496a22a01ea12aff9fdc959356e8b37.tar.gz tdelibs-85a3c08c0496a22a01ea12aff9fdc959356e8b37.zip |
Fix potential crash
Diffstat (limited to 'kio')
-rw-r--r-- | kio/kio/kfileitem.cpp | 14 | ||||
-rw-r--r-- | kio/kio/kurifilter.cpp | 14 |
2 files changed, 16 insertions, 12 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; + } } } diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp index f6910e6a1..f16e0db7d 100644 --- a/kio/kio/kurifilter.cpp +++ b/kio/kio/kurifilter.cpp @@ -222,12 +222,14 @@ TQString KURIFilterData::iconName() { // 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; - m_strIconName = entry->name; - break; + else { + while((entry = get_nexticon(&icons, entry)) != NULL) + { + if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") { + iconresnamefound = 1; + m_strIconName = entry->name; + break; + } } } |