13
0

mackie: stop crashes when switching to X-Touch Compact device

This commit is contained in:
Paul Davis 2016-02-05 17:59:29 -05:00
parent ff14f4d63c
commit 3b1d1675de

View File

@ -390,11 +390,15 @@ Surface::setup_master ()
} }
if (!_master_fader) { if (!_master_fader) {
_master_fader = dynamic_cast<Fader*> (Fader::factory (*this, _mcp.device_info().strip_cnt(), "master", *groups["master"]));
Groups::iterator group_it; Groups::iterator group_it;
group_it = groups.find("master"); group_it = groups.find("master");
if (group_it == groups.end()) {
groups["master"] = new Group ("master");
}
_master_fader = dynamic_cast<Fader*> (Fader::factory (*this, _mcp.device_info().strip_cnt(), "master", *group_it->second));
DeviceInfo device_info = _mcp.device_info(); DeviceInfo device_info = _mcp.device_info();
GlobalButtonInfo master_button = device_info.get_global_button(Button::MasterFaderTouch); GlobalButtonInfo master_button = device_info.get_global_button(Button::MasterFaderTouch);
Button* bb = dynamic_cast<Button*> (Button::factory ( Button* bb = dynamic_cast<Button*> (Button::factory (