qfloat qint: Make conversion from QObject * accept null
authorMarkus Armbruster <armbru@redhat.com>
Thu, 15 Oct 2015 14:15:35 +0000 (16:15 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 29 Oct 2015 13:34:45 +0000 (14:34 +0100)
commitfcf73f66a67f5e58c18216f8c8651e38cf4d90af
treeea430e78cc556fb332a9f3ec1c520e4d602700f3
parent89cad9f3ec6b30d7550fb5704475fc9c3393a066
qfloat qint: Make conversion from QObject * accept null

qobject_to_qfloat() and qobject_to_qint() crash on null, which is a
trap for the unwary.  Return null instead, and simplify a few callers.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1444918537-18107-5-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi/qmp-input-visitor.c
qobject/qdict.c
qobject/qfloat.c
qobject/qint.c