main: Fix warning when client disappears
When a client disappears, check whether there is a driver to disable before turning off polling. Fixes this warning: CRITICAL **: driver_set_polling: assertion 'driver' failed
This commit is contained in:
@@ -299,7 +299,8 @@ client_release (SensorData *data,
|
||||
|
||||
g_hash_table_remove (ht, sender);
|
||||
|
||||
if (g_hash_table_size (ht) == 0)
|
||||
if (driver_type_exists (data, driver_type) &&
|
||||
g_hash_table_size (ht) == 0)
|
||||
driver_set_polling (DRIVER_FOR_TYPE(driver_type), FALSE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user