diff options
author | Joshua Leung <aligorith@gmail.com> | 2006-11-16 05:39:43 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2006-11-16 05:39:43 +0300 |
commit | 0ddd910189f1a7fcf798f76b4c4a1aed9df4d8cd (patch) | |
tree | dbb9d991c8d61659c72a6cb933b9ce0e9e9653f4 /source | |
parent | c25c249eb08ba370d2867ba3af6fb875fad79ce8 (diff) |
Bugfixes for previous commit:
* Now Blender doesn't segfault when trying to add a marker to nowhere.
(Missing checks for NULL marker lists)
* Line widths should now not be widened after drawing markers.
Thanks malefico and Plumiferos team for testing
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/drawaction.c | 2 | ||||
-rw-r--r-- | source/blender/src/editaction.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index de36b02ec98..b127a895911 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -249,6 +249,8 @@ static void draw_marker(TimeMarker *marker) glVertex2fv(vec); glEnd(); + glLineWidth(1.0); + /* 5 px to offset icon to align properly, space / pixels corrects for zoom */ if(marker->flag & SELECT) diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index 4af44f796b7..81f21211916 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -2888,6 +2888,9 @@ void add_saction_marker (ListBase *markers, int frame) { TimeMarker *marker; + if (markers == NULL) + return; + /* two markers can't be at the same place */ for(marker= markers->first; marker; marker= marker->next) if(marker->frame == frame) return; @@ -2940,6 +2943,9 @@ void duplicate_saction_markers(ListBase *markers) { TimeMarker *marker, *newmarker; + if (markers == NULL) + return; + /* go through the list of markers, duplicate selected markers and add duplicated copies * to the begining of the list (unselect original markers) */ for(marker= markers->first; marker; marker= marker->next) { |