mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
no crash if instrument selector has no _instrument_list
This commit is contained in:
parent
6760a06d09
commit
6e96ad04e1
1 changed files with 11 additions and 1 deletions
|
|
@ -19,7 +19,9 @@
|
||||||
#include "pbd/convert.h"
|
#include "pbd/convert.h"
|
||||||
#include "pbd/enumwriter.h"
|
#include "pbd/enumwriter.h"
|
||||||
|
|
||||||
|
#include "ardour/profile.h"
|
||||||
#include "ardour/plugin_manager.h"
|
#include "ardour/plugin_manager.h"
|
||||||
|
|
||||||
#include "gtkmm2ext/gui_thread.h"
|
#include "gtkmm2ext/gui_thread.h"
|
||||||
|
|
||||||
#include "instrument_selector.h"
|
#include "instrument_selector.h"
|
||||||
|
|
@ -47,12 +49,20 @@ InstrumentSelector::drop_plugin_ptr()
|
||||||
{
|
{
|
||||||
unset_model ();
|
unset_model ();
|
||||||
clear ();
|
clear ();
|
||||||
_instrument_list->clear ();
|
if (_instrument_list) {
|
||||||
|
_instrument_list->clear ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
InstrumentSelector::refill()
|
InstrumentSelector::refill()
|
||||||
{
|
{
|
||||||
|
/* XXX conditional can be removed once livetrax has its own simple add
|
||||||
|
tracks dialog.
|
||||||
|
*/
|
||||||
|
if (Profile->get_livetrax()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
TreeModel::iterator iter = get_active();
|
TreeModel::iterator iter = get_active();
|
||||||
std::string selected;
|
std::string selected;
|
||||||
if (iter) {
|
if (iter) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue