Commit 46df5a68 authored by patrick pereira's avatar patrick pereira 🏃

main: Check if there is item before setWindow call for player

Signed-off-by: patrick pereira's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent e103b4fa
......@@ -129,6 +129,11 @@ int main(int argc, char *argv[])
<< QStringLiteral("android.permission.ACCESS_FINE_LOCATION"), &app)));
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
if(engine.rootObjects().isEmpty()) {
qCritical() << "Application failed to load.";
gst_deinit();
return -1;
}
videoPlayer->setWindow(qobject_cast<QQuickWindow *>(engine.rootObjects().first()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment