daemon: Fix possible crasher in UpDevice self-test

This commit is contained in:
Bastien Nocera 2013-10-15 14:53:10 +02:00
parent 01d8004d6c
commit 7e61b09409

View file

@ -178,6 +178,10 @@ update_warning_level (UpDevice *device)
{
UpDeviceLevel warning_level;
/* Not finished setting up the object? */
if (device->priv->daemon == NULL)
return;
warning_level = up_daemon_compute_warning_level (device->priv->daemon,
device->priv->state,
device->priv->type,