diff --git a/src/app/main.cpp b/src/app/main.cpp
index 423c29ca3ef26196e4b82e97f030771c21178831..6ed32e68340e71f0f326ef0986cce24eb6a7655c 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
     // Setup QML
     QQmlApplicationEngine qmlAppEngine;
     QQmlContext *qmlContext = qmlAppEngine.rootContext();
-    qmlContext->setContextProperty("xdgUrlHandler", new handlers::XdgUrl(xdgUrl, config, qmlAppEngine));
+    qmlContext->setContextProperty("xdgUrlHandler", new handlers::XdgUrl(xdgUrl, config, &qmlAppEngine));
     qmlAppEngine.load(QUrl("qrc:/qml/main.qml"));
 
     return app.exec();