core/reloader: fix more crashes (not all of them)

This commit is contained in:
outfoxxed 2024-04-20 02:59:50 -07:00
parent 31462b9797
commit c6e5a35745
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
4 changed files with 52 additions and 21 deletions

View file

@ -58,9 +58,9 @@ void RootWrapper::reloadGraph(bool hard) {
auto url = QUrl::fromLocalFile(this->rootPath);
// unless the original file comes from the qsintercept scheme
url.setScheme("qsintercept");
auto component = QQmlComponent(&generation->engine, url);
auto component = QQmlComponent(generation->engine, url);
auto* obj = component.beginCreate(generation->engine.rootContext());
auto* obj = component.beginCreate(generation->engine->rootContext());
if (obj == nullptr) {
qWarning() << component.errorString().toStdString().c_str();