From: Vadim Zeitlin Date: Fri, 15 Jun 2012 23:23:16 +0000 (+0000) Subject: Fix compilation of MSW wxFSVolume with non-wxMSW ports. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/95fbc73897ecae0a1d32d61cc9af418298f973c8 Fix compilation of MSW wxFSVolume with non-wxMSW ports. There is no way to construct wxIcon from HICON when not using wxMSW, just leave it unimplemented for non-wxMSW ports. Closes #14402. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/volume.cpp b/src/msw/volume.cpp index 24a774b35c..397eb7e228 100644 --- a/src/msw/volume.cpp +++ b/src/msw/volume.cpp @@ -584,6 +584,7 @@ wxIcon wxFSVolume::GetIcon(wxFSIconType type) const wxCHECK_MSG( type >= 0 && (size_t)type < m_icons.GetCount(), wxNullIcon, wxT("wxFSIconType::GetIcon(): invalid icon index") ); +#ifdef __WXMSW__ // Load on demand. if (m_icons[type].IsNull()) { @@ -621,6 +622,10 @@ wxIcon wxFSVolume::GetIcon(wxFSIconType type) const } return m_icons[type]; +#else + wxFAIL_MSG(wxS("Can't convert HICON to wxIcon in this port.")); + return wxNullIcon; +#endif } // GetIcon #endif // wxUSE_GUI