aboutsummaryrefslogtreecommitdiff
path: root/pd/portmidi
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2007-08-02 00:33:50 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2007-08-02 00:33:50 +0000
commitd94dbe2eca3ace84a23bfff30c729662a4486a5a (patch)
tree5868261a1706a36112b5927f2d013613fe4f5971 /pd/portmidi
parent4e5ef76c3a0a96b04eaf605af434094896984319 (diff)
fix name clash in s_audio_jack.c (again) and applied some sourceforge patches
svn path=/trunk/; revision=8342
Diffstat (limited to 'pd/portmidi')
-rw-r--r--pd/portmidi/pm_mac/pmmacosxcm.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/pd/portmidi/pm_mac/pmmacosxcm.c b/pd/portmidi/pm_mac/pmmacosxcm.c
index 1ce7ab1f..58e1b90b 100644
--- a/pd/portmidi/pm_mac/pmmacosxcm.c
+++ b/pd/portmidi/pm_mac/pmmacosxcm.c
@@ -5,7 +5,7 @@
* and subsequent work by Andrew Zeldis and Zico Kolter
* and Roger B. Dannenberg
*
- * $Id: pmmacosxcm.c,v 1.21 2007-07-24 04:53:36 millerpuckette Exp $
+ * $Id: pmmacosxcm.c,v 1.22 2007-08-02 00:33:49 millerpuckette Exp $
*/
/* Notes:
@@ -456,6 +456,14 @@ midi_end_sysex(PmInternal *midi, PmTimestamp when)
if (m->sysex_timestamp < m->last_time) m->sysex_timestamp = m->last_time;
/* now send what's in the buffer */
+ if (m->packet == NULL) {
+ /* if flush has been called in the meantime, packet list is NULL */
+ m->packet = MIDIPacketListInit(m->packetList);
+ /* this can never fail, right? failure would indicate something
+ unrecoverable */
+ assert(m->packet);
+ }
+
err = send_packet(midi, m->sysex_buffer, m->sysex_byte_count,
m->sysex_timestamp);
m->sysex_byte_count = 0;