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
|
||||
defined instruments of the same name.
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
list <Instrument *> Instrument::instruments;
|
||||
|
||||
|
@ -290,11 +290,20 @@ Instrument::listing ( void )
|
|||
list <string> *sys = get_listing( SYSTEM_PATH INSTRUMENT_DIR );
|
||||
list <string> *usr = get_listing( config.user_config_dir );
|
||||
|
||||
if ( ! ( usr || sys ) )
|
||||
return NULL;
|
||||
|
||||
if ( sys && usr )
|
||||
usr->merge( *sys );
|
||||
else
|
||||
if ( sys && ! usr )
|
||||
usr = sys;
|
||||
|
||||
usr->unique();
|
||||
|
||||
usr->sort();
|
||||
|
||||
if ( sys )
|
||||
delete sys;
|
||||
|
||||
char **sa = (char**)malloc( (usr->size() + 1) * sizeof( char * ) );
|
||||
|
|
Loading…
Reference in New Issue