Skip to content

Commit

Permalink
Avoid empty 'len'
Browse files Browse the repository at this point in the history
  • Loading branch information
zonkmachine committed Feb 4, 2017
1 parent 62c8700 commit f410d05
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/DataFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -915,9 +915,12 @@ void DataFile::upgrade_1_2_0_rc3()
QDomElement el = list.item( i ).toElement();
for( int i = 0; !list.item( i ).isNull(); ++i )
{
patternLength = el.attribute( "len" ).toInt();
steps = patternLength / 12;
el.setAttribute( "steps", steps );
if( el.attribute( "len" ) != "" )
{
patternLength = el.attribute( "len" ).toInt();
steps = patternLength / 12;
el.setAttribute( "steps", steps );
}
}
}
}
Expand Down

0 comments on commit f410d05

Please sign in to comment.