Stay away from unnecessary code paths if the movie is 0 (NULL)

When closing a QT7PlayerSession, it sets the movie to 0. There is no
need to check if a NULL movie supports the core pixel formats, and
that check lead to a segmentation fault with QtSDK 1.1.1.

Task-number: QTMOBILITY-1746
Reviewed-by: Dmytro Poplavskiy
(cherry picked from commit b5d9964aab96ef1a02ca1af411178f05c42c2bf8)

Change-Id: I7cdddbd8fc1b8d8d667747aec3567aeb857accd6
Reviewed-on: http://codereview.qt.nokia.com/984
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Goddard
This commit is contained in:
Jonas Rabbe
2011-06-30 14:35:59 +10:00
committed by Qt by Nokia
parent ca25844e52
commit d13d75949f

View File

@@ -283,6 +283,8 @@ void QT7MovieViewRenderer::setupVideoOutput()
[movieView setMovie:(QTMovie*)m_movie];
[movieView setDrawRect:QRect(QPoint(0,0), m_nativeSize)];
} else {
m_nativeSize = QSize();
}
if (m_surface && !m_nativeSize.isEmpty()) {