diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 905f9d9bd9..e079149348 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -173,7 +173,7 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime) wxTheMimeTypesManager -> GetFileTypeFromExtension(extension) : wxTheMimeTypesManager -> GetFileTypeFromMimeType(mime); wxIcon ic; - if (ft == NULL || (!ft -> GetIcon(&ic))) + if (ft == NULL || (!ft -> GetIcon(&ic)) || (!ic.Ok())) { int newid = FI_UNKNOWN; m_HashTable.Put(extension, new wxFileIconEntry(newid));