Fix #23985: crash in graph editor with objects without material.

This commit is contained in:
Brecht Van Lommel
2010-09-25 14:14:04 +00:00
parent 9f6544b426
commit cd429bdb50

View File

@@ -2420,12 +2420,14 @@ static int animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data, bDo
break;
}
for (mtInd= 0; mtInd < MAX_MTEX; mtInd++) {
MTex *mtex= ma->mtex[mtInd];
if (mtex && mtex->tex && ANIMDATA_HAS_KEYS(mtex->tex)) {
matOk= 1;
break;
if(ma) {
for (mtInd= 0; mtInd < MAX_MTEX; mtInd++) {
MTex *mtex= ma->mtex[mtInd];
if (mtex && mtex->tex && ANIMDATA_HAS_KEYS(mtex->tex)) {
matOk= 1;
break;
}
}
}