The user database is populated on-demand, but the cache dropping
code assumed it had been initialized. Simply check for NULL.
https://bugs.freedesktop.org/show_bug.cgi?id=26182
static void
shutdown_system_db (void *data)
{
- _dbus_user_database_unref (system_db);
+ if (system_db != NULL)
+ _dbus_user_database_unref (system_db);
system_db = NULL;
_dbus_string_free (&process_username);
_dbus_string_free (&process_homedir);
{
_dbus_user_database_lock_system ();
- _dbus_user_database_flush (system_db);
+ if (system_db != NULL)
+ _dbus_user_database_flush (system_db);
_dbus_user_database_unlock_system ();
}