X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e7ed2b008e4c179b4b46449877f2e492cc0ab9f..4b26b60fac70f89cf33935f78469e27536d8b614:/src/common/artprov.cpp diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index 088fc3a2f8..194219d32d 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -119,6 +119,7 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; } sm_providers->Insert(provider); + sm_cache->Clear(); } /*static*/ bool wxArtProvider::PopProvider() @@ -194,25 +195,27 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; wxCHECK_MSG( sm_providers, wxNullIcon, _T("no wxArtProvider exists") ); wxBitmap bmp = GetBitmap(id, client, size); - if ( bmp.Ok() ) - { - wxIcon icon; - icon.CopyFromBitmap(bmp); - return icon; - } - else - { + if ( !bmp.Ok() ) return wxNullIcon; - } -} + wxIcon icon; + icon.CopyFromBitmap(bmp); + return icon; +} class wxArtProviderModule: public wxModule { public: - bool OnInit() { return TRUE; } - void OnExit() { wxArtProvider::CleanUpProviders(); } + bool OnInit() + { + wxArtProvider::InitStdProvider(); + return TRUE; + } + void OnExit() + { + wxArtProvider::CleanUpProviders(); + } DECLARE_DYNAMIC_CLASS(wxArtProviderModule) };