Fix an assert when starting the 3D viewer in Debug mode (Linux only)

Fixes: lp:1731344
https://bugs.launchpad.net/kicad/+bug/1731344
This commit is contained in:
jean-pierre charras 2017-11-17 10:20:55 +01:00
parent d24c88f254
commit 10de79260d
1 changed files with 5 additions and 2 deletions

View File

@ -133,10 +133,13 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
checkPluginPath( testpath, searchpaths );
// add subdirectories too
wxDir debugPluginDir( testpath );
wxDir debugPluginDir;
wxString subdir;
if( debugPluginDir.GetFirst( &subdir, wxEmptyString, wxDIR_DIRS ) )
debugPluginDir.Open( testpath );
if( debugPluginDir.IsOpened() &&
debugPluginDir.GetFirst( &subdir, wxEmptyString, wxDIR_DIRS ) )
{
checkPluginPath( testpath + subdir, searchpaths );