diff options
Diffstat (limited to 'src/multimedia/video/qvideooutputorientationhandler.cpp')
-rw-r--r-- | src/multimedia/video/qvideooutputorientationhandler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/multimedia/video/qvideooutputorientationhandler.cpp b/src/multimedia/video/qvideooutputorientationhandler.cpp index 2a6781b47..86e6bd664 100644 --- a/src/multimedia/video/qvideooutputorientationhandler.cpp +++ b/src/multimedia/video/qvideooutputorientationhandler.cpp @@ -51,6 +51,8 @@ QVideoOutputOrientationHandler::QVideoOutputOrientationHandler(QObject *parent) , m_currentOrientation(0) { QScreen *screen = QGuiApplication::primaryScreen(); + if (!screen) + return; connect(screen, SIGNAL(orientationChanged(Qt::ScreenOrientation)), this, SLOT(screenOrientationChanged(Qt::ScreenOrientation))); @@ -69,6 +71,8 @@ void QVideoOutputOrientationHandler::screenOrientationChanged(Qt::ScreenOrientat return; const QScreen *screen = QGuiApplication::primaryScreen(); + if (!screen) + return; const int angle = (360 - screen->angleBetween(screen->nativeOrientation(), orientation)) % 360; |