From e7d21fa39eb38532a6810edc80c0905dbbd51609 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 15 Jul 2004 21:04:02 +0000 Subject: [PATCH] ignore unexpected exceptions while extracting icons svn path=/trunk/; revision=10133 --- reactos/subsys/system/explorer/shell/shellfs.cpp | 12 ++++++++++-- reactos/subsys/system/explorer/taskbar/startmenu.cpp | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/system/explorer/shell/shellfs.cpp b/reactos/subsys/system/explorer/shell/shellfs.cpp index 9fb227483b3..ca849de618e 100644 --- a/reactos/subsys/system/explorer/shell/shellfs.cpp +++ b/reactos/subsys/system/explorer/shell/shellfs.cpp @@ -306,7 +306,11 @@ void ShellDirectory::read_directory(int scan_flags) if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) entry->_icon_id = ICID_FOLDER; else if (scan_flags & SCAN_EXTRACT_ICONS) - entry->extract_icon(); + try { + entry->extract_icon(); + } catch(COMException&) { + // ignore unexpected exceptions while extracting icons + } last = entry; } while(FindNextFile(hFind, &w32fd)); @@ -408,7 +412,11 @@ void ShellDirectory::read_directory(int scan_flags) if (!(entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !(attribs & SFGAO_FILESYSTEM)) { if (scan_flags & SCAN_EXTRACT_ICONS) - entry->extract_icon(); + try { + entry->extract_icon(); + } catch(COMException&) { + // ignore unexpected exceptions while extracting icons + } } else if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) entry->_icon_id = ICID_FOLDER; else diff --git a/reactos/subsys/system/explorer/taskbar/startmenu.cpp b/reactos/subsys/system/explorer/taskbar/startmenu.cpp index f4a9da2de3a..7ffef196dae 100644 --- a/reactos/subsys/system/explorer/taskbar/startmenu.cpp +++ b/reactos/subsys/system/explorer/taskbar/startmenu.cpp @@ -153,7 +153,7 @@ HWND StartMenu::Create(int x, int y, const StartMenuFolders& folders, HWND hwndP } -LRESULT StartMenu::Init(LPCREATESTRUCT pcs) +LRESULT StartMenu::Init(LPCREATESTRUCT pcs) { try { AddEntries();