Commit d711d1157c316027efd296f7a8c399329804c323
don't crash if the lyrics applet tries to access the view before it exists
BUG: 228096
| |   |
| 544 | 544 | // only show vertical scrollbar if there are lyrics and is needed |
| 545 | 545 | browser->setVerticalScrollBarPolicy( m_hasLyrics ? Qt::ScrollBarAsNeeded : Qt::ScrollBarAlwaysOff ); |
| 546 | 546 | |
| // maybe we were just added, don't have a view yet |
| if( !containment()->view() ) |
| return; |
| |
| 547 | 551 | const qreal containerOffset = mapToView( containment()->view(), boundingRect() ).topLeft().y(); |
| 548 | 552 | const qreal containerHeight = containment()->size().height() - containerOffset; |
| 549 | 553 | const qreal collapsedHeight = ( contentHeight > containerHeight ) ? containerHeight : contentHeight; |