mirror of https://github.com/status-im/nimqml.git
Merge pull request #51 from status-im/fix/crash-on-emit-with-null
fix(qobject): Crash on signal emit with null vptr
This commit is contained in:
commit
06a6c70404
|
@ -23,6 +23,9 @@ method metaObject*(self: QObject): QMetaObject {.base.} =
|
|||
QObject.staticMetaObject
|
||||
|
||||
proc emit*(qobject: QObject, signalName: string, arguments: openarray[QVariant] = []) =
|
||||
if qobject.vptr.isNil:
|
||||
return
|
||||
|
||||
## Emit the signal with the given name and values
|
||||
var dosArguments: seq[DosQVariant] = @[]
|
||||
for argument in arguments:
|
||||
|
|
Loading…
Reference in New Issue