Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-06-25 23:48:05 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-25 23:48:05 +0400
commit01dea9ff85edb64d7b91112fc4b1e94bf99fb192 (patch)
treec690f24c1ec7d67369b76086c5716a5561269bdd /source
parent4da7b7089d3d3a9e6228c14f2a81d44f9c2a28d8 (diff)
Fixed crash when trying to perform transformation in Clip Editor without clip opened
Reported by JumboCoDeC in IRC. Thanks for the report.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_clip/clip_editor.c7
-rw-r--r--source/blender/editors/transform/transform_conversions.c5
2 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index b57b16707d4..224a250fe4c 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -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);
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index e924ce15286..dcc876b6026 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -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) {