|
@@ -131,7 +131,7 @@ unsigned _cmTlIdLabelToId( _cmTl_t* p, const cmChar_t* label )
|
131
|
131
|
// cast a generic object to a midi file object
|
132
|
132
|
cmTlMidiFile_t* _cmTlMidiFileObjPtr( _cmTl_t* p, cmTlObj_t* op, bool errFl )
|
133
|
133
|
{
|
134
|
|
- if( op->typeId != kMidiFileTlId )
|
|
134
|
+ if( op==NULL || op->typeId != kMidiFileTlId )
|
135
|
135
|
{
|
136
|
136
|
if( errFl && p != NULL)
|
137
|
137
|
cmErrMsg(&p->err,kTypeCvtFailTlRC,"A time line object type promotion failed.");
|
|
@@ -144,7 +144,7 @@ cmTlMidiFile_t* _cmTlMidiFileObjPtr( _cmTl_t* p, cmTlObj_t* op, bool errFl )
|
144
|
144
|
// cast a generic object to a midi event object
|
145
|
145
|
cmTlMidiEvt_t* _cmTlMidiEvtObjPtr( _cmTl_t* p, cmTlObj_t* op, bool errFl )
|
146
|
146
|
{
|
147
|
|
- if( op->typeId != kMidiEvtTlId )
|
|
147
|
+ if( op==NULL || op->typeId != kMidiEvtTlId )
|
148
|
148
|
{
|
149
|
149
|
if( errFl && p != NULL )
|
150
|
150
|
cmErrMsg(&p->err,kTypeCvtFailTlRC,"A time line object type promotion failed.");
|
|
@@ -157,7 +157,7 @@ cmTlMidiEvt_t* _cmTlMidiEvtObjPtr( _cmTl_t* p, cmTlObj_t* op, bool errFl )
|
157
|
157
|
// case a generic object to an audio file object
|
158
|
158
|
cmTlAudioFile_t* _cmTlAudioFileObjPtr( _cmTl_t* p, cmTlObj_t* op, bool errFl )
|
159
|
159
|
{
|
160
|
|
- if( op->typeId != kAudioFileTlId )
|
|
160
|
+ if( op==NULL || op->typeId != kAudioFileTlId )
|
161
|
161
|
{
|
162
|
162
|
if( errFl && p != NULL)
|
163
|
163
|
cmErrMsg(&p->err,kTypeCvtFailTlRC,"A time line object type promotion failed.");
|
|
@@ -170,7 +170,7 @@ cmTlAudioFile_t* _cmTlAudioFileObjPtr( _cmTl_t* p, cmTlObj_t* op, bool errFl )
|
170
|
170
|
// cast a generic object an audio event object to
|
171
|
171
|
cmTlAudioEvt_t* _cmTlAudioEvtObjPtr( _cmTl_t* p, cmTlObj_t* op, bool errFl )
|
172
|
172
|
{
|
173
|
|
- if( op->typeId != kAudioEvtTlId )
|
|
173
|
+ if( op==NULL || op->typeId != kAudioEvtTlId )
|
174
|
174
|
{
|
175
|
175
|
if( errFl && p != NULL)
|
176
|
176
|
cmErrMsg(&p->err,kTypeCvtFailTlRC,"A time line object type promotion failed.");
|
|
@@ -183,7 +183,7 @@ cmTlAudioEvt_t* _cmTlAudioEvtObjPtr( _cmTl_t* p, cmTlObj_t* op, bool errFl )
|
183
|
183
|
// cast a generic object to a marker object
|
184
|
184
|
cmTlMarker_t* _cmTlMarkerObjPtr( _cmTl_t* p, cmTlObj_t* op, bool errFl )
|
185
|
185
|
{
|
186
|
|
- if( op->typeId != kMarkerTlId )
|
|
186
|
+ if( op==NULL || op->typeId != kMarkerTlId )
|
187
|
187
|
{
|
188
|
188
|
if( errFl && p != NULL)
|
189
|
189
|
cmErrMsg(&p->err,kTypeCvtFailTlRC,"A time line object type promotion failed.");
|