commit 2d95acdf0f07d21746115b43b93430b107579386 Author: Richard Hughes Date: Tue Aug 26 08:53:39 2008 +0100 bugfix: don't crash the daemon if we never used SetLocale, instead use the C locale in the backend. Fixes fd#17298 diff --git a/src/pk-transaction.c b/src/pk-transaction.c index 39bc104..4833fa4 100644 --- a/src/pk-transaction.c +++ b/src/pk-transaction.c @@ -831,7 +831,14 @@ pk_transaction_set_running (PkTransaction *transaction) /* assign */ pk_backend_set_current_tid (priv->backend, priv->tid); - pk_backend_set_locale (priv->backend, priv->locale); + + /* if we didn't set a locale for this transaction, we would reuse the + * last set locale in the backend, or NULL if it was not ever set. + * in this case use the C locale */ + if (priv->locale == NULL) + pk_backend_set_locale (priv->backend, "C"); + else + pk_backend_set_locale (priv->backend, priv->locale); /* set the role */ pk_backend_set_role (priv->backend, priv->role);