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
This commit is contained in:
Joshua Leung
2006-11-16 02:39:43 +00:00
parent c25c249eb0
commit 0ddd910189
2 changed files with 8 additions and 0 deletions

View File

@@ -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)

View File

@@ -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) {