[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51072] trunk/blender/source/blender/ editors/space_view3d/drawanimviz.c: Bugfix [#32760] Crash on entering pose mode if motion paths have no baked points
Joshua Leung
aligorith at gmail.com
Fri Oct 5 08:40:21 CEST 2012
Revision: 51072
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51072
Author: aligorith
Date: 2012-10-05 06:40:21 +0000 (Fri, 05 Oct 2012)
Log Message:
-----------
Bugfix [#32760] Crash on entering pose mode if motion paths have no baked points
Dunno how a file with this situation arose, but we now perform some more sanity checking to abort in this sticky situation.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_view3d/drawanimviz.c
Modified: trunk/blender/source/blender/editors/space_view3d/drawanimviz.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawanimviz.c 2012-10-05 05:59:15 UTC (rev 51071)
+++ trunk/blender/source/blender/editors/space_view3d/drawanimviz.c 2012-10-05 06:40:21 UTC (rev 51072)
@@ -107,11 +107,6 @@
* - abort if whole range is past ends of path
* - otherwise clamp endpoints to extents of path
*/
- if ((sfra > mpath->end_frame) || (efra < mpath->start_frame)) {
- /* whole path is out of bounds */
- return;
- }
-
if (sfra < mpath->start_frame) {
/* start clamp */
sfra = mpath->start_frame;
@@ -121,9 +116,14 @@
efra = mpath->end_frame;
}
+ if ((sfra > mpath->end_frame) || (efra < mpath->start_frame)) {
+ /* whole path is out of bounds */
+ return;
+ }
+
len = efra - sfra;
- if (len <= 0) {
+ if ((len <= 0) || (mpath->points == NULL)) {
return;
}
@@ -180,7 +180,7 @@
UI_ThemeColorBlendShade(TH_CFRAME, TH_BACK, intensity, 10);
}
- /* draw a vertex with this color */
+ /* draw a vertex with this color */
glVertex3fv(mpv->co);
}
@@ -230,7 +230,7 @@
unsigned char col[4];
UI_GetThemeColor3ubv(TH_TEXT_HI, col);
col[3] = 255;
-
+
for (i = 0, mpv = mpv_start; i < len; i += stepsize, mpv += stepsize) {
char numstr[32];
float co[3];
More information about the Bf-blender-cvs
mailing list