From b27f52ce2434d703dfafa3f98e74ff6e42027386 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Dec 2010 04:10:21 +0000 Subject: bugfix [#25154] .MXF files should be included as a known video file type in the sequencer [#25159] Vertex locations dont read correctly and are not labeled correctly in the properties bar. - non rna buttons can now have units set. - calls with invalid units system now raises an assert(). - include .mxf in filter. --- source/blender/blenkernel/intern/unit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/unit.c') diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 69a43ac60f0..1b04589c1f2 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "BKE_unit.h" #include "BLI_math.h" @@ -274,6 +275,7 @@ static struct bUnitCollection *bUnitSystems[][9] = { /* internal, has some option not exposed */ static bUnitCollection *unit_get_system(int system, int type) { + assert((system > -1) && (system < UNIT_SYSTEM_TOT) && (type > -1) && (type < B_UNIT_TYPE_TOT)); return bUnitSystems[system][type]; /* select system to use, metric/imperial/other? */ } @@ -738,7 +740,7 @@ double bUnit_BaseScalar(int system, int type) /* external access */ int bUnit_IsValid(int system, int type) { - return !(type < 0 || type >= B_UNIT_MAXDEF || system < 0 || system > UNIT_SYSTEM_TOT); + return !(system < 0 || system > UNIT_SYSTEM_TOT || type < 0 || type > B_UNIT_TYPE_TOT); } -- cgit v1.2.3