X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d3dfc57e77c64a4691fae47b566bcfb99eceb48..d298f18ffb4bd0bd758b10f34c9e01cd119d1365:/src/common/artprov.cpp diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index 3a4f56b04c..69c6928528 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -204,11 +204,8 @@ wxArtProvider::~wxArtProvider() while ( !sm_providers->empty() ) delete *sm_providers->begin(); - delete sm_providers; - sm_providers = NULL; - - delete sm_cache; - sm_cache = NULL; + wxDELETE(sm_providers); + wxDELETE(sm_cache); } } @@ -234,12 +231,12 @@ wxArtProvider::~wxArtProvider() node; node = node->GetNext()) { bmp = node->GetData()->CreateBitmap(id, client, size); - if ( bmp.Ok() ) + if ( bmp.IsOk() ) break; } wxSize sizeNeeded = size; - if ( !bmp.Ok() ) + if ( !bmp.IsOk() ) { // no bitmap created -- as a fallback, try if we can find desired // icon in a bundle @@ -443,7 +440,12 @@ class wxArtProviderModule: public wxModule public: bool OnInit() { +#if wxUSE_ARTPROVIDER_STD wxArtProvider::InitStdProvider(); +#endif // wxUSE_ARTPROVIDER_STD +#if wxUSE_ARTPROVIDER_TANGO + wxArtProvider::InitTangoProvider(); +#endif // wxUSE_ARTPROVIDER_TANGO wxArtProvider::InitNativeProvider(); return true; }