[#18209] 3 VSE crash bugs with .blends (all left click and move mouse over Metastrip/Blend Mode related)

Workaround for a bug where dragging the playhead over a metastrip with blending on it could segfault blender.
Tried to figure out why the imbuf rect is not set, but for now a NULL check stops the crash.
This commit is contained in:
Campbell Barton 2009-02-13 06:24:15 +00:00
parent 64d2984aa0
commit b052ae4cdb

@ -2111,6 +2111,14 @@ static TStripElem* do_build_seq_recursively(Sequence * seq, int cfra)
}
}
/* Bug: 18209
* when dragging the mouse over a metastrip, on mouse-up for some unknown
* reason in some cases the metastrips TStripElem->ibuf->rect is NULL,
* This should be fixed but I had a look and couldnt work out why its
* happening so for now workaround with a NULL check - campbell */
#define SEQ_SPECIAL_SEQ_UPDATE_WORKAROUND
static TStripElem* do_build_seq_array_recursively(
ListBase *seqbasep, int cfra, int chanshown)
{
@ -2277,7 +2285,14 @@ static TStripElem* do_build_seq_array_recursively(
!se2->ibuf_comp->rect_float) {
IMB_rect_from_float(se2->ibuf);
}
#ifdef SEQ_SPECIAL_SEQ_UPDATE_WORKAROUND
if (se2->ibuf->rect==NULL && se2->ibuf->rect_float==NULL) {
printf("ERROR: sequencer se2->ibuf missing buffer\n");
} else if (se1->ibuf->rect==NULL && se1->ibuf->rect_float==NULL) {
printf("ERROR: sequencer se1->ibuf missing buffer\n");
} else {
#endif
/* bad hack, to fix crazy input ordering of
those two effects */
@ -2299,6 +2314,10 @@ static TStripElem* do_build_seq_array_recursively(
se2->ibuf_comp);
}
#ifdef SEQ_SPECIAL_SEQ_UPDATE_WORKAROUND
}
#endif
IMB_cache_limiter_insert(se2->ibuf_comp);
IMB_cache_limiter_ref(se2->ibuf_comp);
IMB_cache_limiter_touch(se2->ibuf_comp);