13
0

Fix crash when MackieControlProtocol has gone away.

git-svn-id: svn://localhost/ardour2/branches/3.0@12634 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-06-09 21:06:22 +00:00
parent 9dc61bff3a
commit 2492b43b56

View File

@ -47,7 +47,8 @@ Fader::set_position (float normalized)
MidiByteArray
Fader::update_message ()
{
if (MackieControlProtocol::instance()->flip_mode() == MackieControlProtocol::Zero) {
MackieControlProtocol* mcp = MackieControlProtocol::instance ();
if (mcp && mcp->flip_mode() == MackieControlProtocol::Zero) {
/* do not send messages to move the faders when in this mode */
return MidiByteArray();
}