summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-07-02 13:39:46 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-07-02 13:39:46 +0000
commit2062ce8186592801d84162f6fa14173769b37521 (patch)
tree241a9d7ac11432279dd5aba91480e3ab66a7b003
parent082b4a2019beb61dba10a1af1a443696c5942072 (diff)
a few more if (_mmc) tests
git-svn-id: svn://localhost/ardour2/branches/3.0@7356 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/session.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 675cd9acfe..ea48f9c60f 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -961,7 +961,9 @@ Session::enable_record ()
if (g_atomic_int_get (&_record_status) != Recording) {
g_atomic_int_set (&_record_status, Recording);
_last_record_location = _transport_frame;
- _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdRecordStrobe));
+ if (_mmc) {
+ _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdRecordStrobe));
+ }
if (Config->get_monitoring_model() == HardwareMonitoring && config.get_auto_input()) {
@@ -987,7 +989,9 @@ Session::disable_record (bool rt_context, bool force)
if ((!Config->get_latched_record_enable () && !play_loop) || force) {
g_atomic_int_set (&_record_status, Disabled);
- _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdRecordExit));
+ if (_mmc) {
+ _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdRecordExit));
+ }
} else {
if (rs == Recording) {
g_atomic_int_set (&_record_status, Enabled);
@@ -1047,7 +1051,9 @@ Session::maybe_enable_record ()
enable_record ();
}
} else {
- _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdRecordPause));
+ if (_mmc) {
+ _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdRecordPause));
+ }
RecordStateChanged (); /* EMIT SIGNAL */
}