mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
main: qobject_cast may return null, check its result
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
parent
a9d9d282d7
commit
19bfd7141d
@ -118,6 +118,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
QObject *rootObject = engine.rootObjects().first();
|
||||
QQuickWindow *windowObject = qobject_cast<QQuickWindow *>(rootObject);
|
||||
Q_ASSERT(windowObject);
|
||||
if (windowObject)
|
||||
QObject::connect(&app, &SingleApplication::receivedMessage,
|
||||
windowObject, [windowObject] () { raiseWindow(windowObject); } );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user