diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-10 07:10:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-10 07:10:21 +0300 |
commit | b27f52ce2434d703dfafa3f98e74ff6e42027386 (patch) | |
tree | bdd295a84a954db76f2c8f2f2d41fed531502c6b /source/blender/blenkernel/intern | |
parent | b4081bfc7beecf45d58137885c6abac81e3fb27b (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 <stdio.h> #include <ctype.h> #include <string.h> +#include <assert.h> #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); } |