Skip to content

Commit

Permalink
fix possible crash for barline and hidden staff
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Feb 28, 2014
1 parent cd6367d commit bb9c7b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmscore/barline.cpp
Expand Up @@ -88,7 +88,7 @@ QPointF BarLine::pagePos() const
int staffIdx1 = staffIdx();
Staff* staff1 = score()->staff(staffIdx1);
SysStaff* sysStaff1 = system->staff(staffIdx1);
while ( !(sysStaff1->show() && staff1->show()) ) {
while ( staff1 && sysStaff1 && !(sysStaff1->show() && staff1->show()) ) {
staffIdx1++;
staff1 = score()->staff(staffIdx1);
sysStaff1 = system->staff(staffIdx1);
Expand Down

0 comments on commit bb9c7b3

Please sign in to comment.