Oops. Fix regression in instrument loader resulting in a confusing error message.
This commit is contained in:
parent
7421e646df
commit
bbd49089a1
11
instrument.C
11
instrument.C
|
@ -51,7 +51,7 @@ using std::string;
|
||||||
loading instruments, user defined instruments always hide system
|
loading instruments, user defined instruments always hide system
|
||||||
defined instruments of the same name.
|
defined instruments of the same name.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
list <Instrument *> Instrument::instruments;
|
list <Instrument *> Instrument::instruments;
|
||||||
|
|
||||||
|
@ -290,11 +290,20 @@ Instrument::listing ( void )
|
||||||
list <string> *sys = get_listing( SYSTEM_PATH INSTRUMENT_DIR );
|
list <string> *sys = get_listing( SYSTEM_PATH INSTRUMENT_DIR );
|
||||||
list <string> *usr = get_listing( config.user_config_dir );
|
list <string> *usr = get_listing( config.user_config_dir );
|
||||||
|
|
||||||
|
if ( ! ( usr || sys ) )
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if ( sys && usr )
|
||||||
usr->merge( *sys );
|
usr->merge( *sys );
|
||||||
|
else
|
||||||
|
if ( sys && ! usr )
|
||||||
|
usr = sys;
|
||||||
|
|
||||||
usr->unique();
|
usr->unique();
|
||||||
|
|
||||||
usr->sort();
|
usr->sort();
|
||||||
|
|
||||||
|
if ( sys )
|
||||||
delete sys;
|
delete sys;
|
||||||
|
|
||||||
char **sa = (char**)malloc( (usr->size() + 1) * sizeof( char * ) );
|
char **sa = (char**)malloc( (usr->size() + 1) * sizeof( char * ) );
|
||||||
|
|
Loading…
Reference in New Issue