Mackie Control: Don't crash when the master is on the right
While surfaces are being created it is possible to have surfaces, but not have a master surface yet. This happens when the config calls for extenders to the left of the master section. Don't assume that if we have surfaces, the master surface is available.
This commit is contained in:
@@ -610,7 +610,7 @@ MackieControlProtocol::update_global_button (int id, LedState ls)
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm (surfaces_lock);
|
||||
|
||||
if (surfaces.empty()) {
|
||||
if (!_master_surface) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -694,6 +694,10 @@ MackieControlProtocol::initialize()
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_master_surface) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_master_surface->active ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user