]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/artprov.cpp
don't try to remove -g flag from CFLAGS, it is not necessary and doesn't work correct...
[wxWidgets.git] / src / common / artprov.cpp
index 088fc3a2f82f2aeeac3a60974167c0d3605063d9..64b87d781ee45ee1f587a34bc7b45e32828d5208 100644 (file)
@@ -119,6 +119,7 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL;
     }
 
     sm_providers->Insert(provider);
+    sm_cache->Clear();
 }
 
 /*static*/ bool wxArtProvider::PopProvider()
@@ -194,18 +195,13 @@ 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