vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <[email protected]> | Thu Aug 30 21:48:37 2012 +0200| [e60b9b8f9e8e991617eba0e391a49e0e22f51215] | committer: Jean-Baptiste Kempf
Skins2: blind attempt to fix a ThemeRepository crash Top crash on Skins2 module on Win32 (cherry picked from commit 9e76fdbc6e1e1243c59126688f23141329f10461) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=e60b9b8f9e8e991617eba0e391a49e0e22f51215 --- modules/gui/skins2/src/theme_repository.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/gui/skins2/src/theme_repository.cpp b/modules/gui/skins2/src/theme_repository.cpp index 68e7dae..51cf89f 100644 --- a/modules/gui/skins2/src/theme_repository.cpp +++ b/modules/gui/skins2/src/theme_repository.cpp @@ -73,6 +73,7 @@ ThemeRepository::ThemeRepository( intf_thread_t *pIntf ): SkinObject( pIntf ) // retrieve skins from skins directories and locate default skins map<string,string>::const_iterator itmap, itdefault; + bool b_default_found = false; for( itmap = m_skinsMap.begin(); itmap != m_skinsMap.end(); ++itmap ) { string name = itmap->first; @@ -83,7 +84,10 @@ ThemeRepository::ThemeRepository( intf_thread_t *pIntf ): SkinObject( pIntf ) &text ); if( name == "Default" ) + { itdefault = itmap; + b_default_found = true; + } } // retrieve last skins stored or skins requested by user @@ -98,7 +102,7 @@ ThemeRepository::ThemeRepository( intf_thread_t *pIntf ): SkinObject( pIntf ) current.c_str(), b_readable ? "" : "NOT" ); // set the default skins if given skins not accessible - if( !b_readable ) + if( !b_readable && b_default_found ) current = itdefault->second; // save this valid skins for reuse _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
