forked from bartvdbraak/blender
Fixed crash when trying to perform transformation in Clip Editor without clip opened
Reported by JumboCoDeC in IRC. Thanks for the report.
This commit is contained in:
parent
4da7b7089d
commit
01dea9ff85
@ -177,6 +177,13 @@ void ED_space_clip_get_aspect_dimension_aware(SpaceClip *sc, float *aspx, float
|
||||
* mainly this is sued for transformation stuff
|
||||
*/
|
||||
|
||||
if (!sc->clip) {
|
||||
*aspx = 1.0f;
|
||||
*aspy = 1.0f;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ED_space_clip_get_aspect(sc, aspx, aspy);
|
||||
BKE_movieclip_get_size(sc->clip, &sc->user, &w, &h);
|
||||
|
||||
|
@ -5913,9 +5913,12 @@ static void createTransTrackingData(bContext *C, TransInfo *t)
|
||||
|
||||
t->total = 0;
|
||||
|
||||
if (!clip)
|
||||
return;
|
||||
|
||||
BKE_movieclip_get_size(clip, &sc->user, &width, &height);
|
||||
|
||||
if (!clip || width == 0 || height == 0)
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
if (ar->regiontype == RGN_TYPE_PREVIEW) {
|
||||
|
Loading…
Reference in New Issue
Block a user