mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-15 01:46:34 +01:00
US2400 - fix crash when no strip is selected
first selected could be null, so check that first. This is untested since I don't have a surface.
This commit is contained in:
parent
834ca29cde
commit
be90b4e0ca
1 changed files with 15 additions and 11 deletions
|
|
@ -130,18 +130,22 @@ LedState
|
|||
US2400Protocol::right_press (Button &)
|
||||
{
|
||||
if (_subview_mode != None) {
|
||||
bool hasNextSend = true;
|
||||
int numSends = 0;
|
||||
while (hasNextSend) {
|
||||
if (first_selected_stripable()->send_name(numSends).length() < 1) {
|
||||
hasNextSend = false;
|
||||
} else {
|
||||
numSends++;
|
||||
boost::shared_ptr<Stripable> s = first_selected_stripable();
|
||||
|
||||
if (s) {
|
||||
bool hasNextSend = true;
|
||||
int numSends = 0;
|
||||
while (hasNextSend) {
|
||||
if (s->send_name(numSends).length() < 1) {
|
||||
hasNextSend = false;
|
||||
} else {
|
||||
numSends++;
|
||||
}
|
||||
}
|
||||
if (numSends > (_sends_bank + 1) * 16) {
|
||||
_sends_bank++;
|
||||
redisplay_subview_mode();
|
||||
}
|
||||
}
|
||||
if (numSends > (_sends_bank + 1) * 16) {
|
||||
_sends_bank++;
|
||||
redisplay_subview_mode();
|
||||
}
|
||||
return none;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue