mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-10 01:00:20 +01:00
test-privserver: Exit if DBusLoop cannot be allocated
Otherwise, we'd just crash when we dereference the null pointer. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
76296a5f0b
commit
9490157ef9
1 changed files with 3 additions and 0 deletions
|
|
@ -127,6 +127,9 @@ main (int argc, char *argv[])
|
|||
testdata = dbus_new (TestServiceData, 1);
|
||||
testdata->loop = _dbus_loop_new ();
|
||||
|
||||
if (testdata->loop == NULL)
|
||||
die ("out of memory");
|
||||
|
||||
session = dbus_bus_get (DBUS_BUS_SESSION, &error);
|
||||
if (!session)
|
||||
die ("couldn't access session bus");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue