summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2007-08-20 17:54:33 -0400
committerDavid Zeuthen <davidz@redhat.com>2007-08-20 17:54:33 -0400
commit7090ddbacaabf318d7d87c9b93ce5805fa765c06 (patch)
tree661c73199dd9609e29f01a6807f3ab81d515aeb1
parent07bd50776b1be13f506f9a75763ecc32a469d408 (diff)
handle the case where we don't load descriptions
-rw-r--r--polkit/polkit-policy-file.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/polkit/polkit-policy-file.c b/polkit/polkit-policy-file.c
index b5224f6..c31dc24 100644
--- a/polkit/polkit-policy-file.c
+++ b/polkit/polkit-policy-file.c
@@ -390,9 +390,15 @@ _end (void *data, const char *el)
if (pfe == NULL)
goto error;
- group_description = _localize (pd->group_descriptions, pd->group_description_nolang, pd->lang);
- policy_description = _localize (pd->policy_descriptions, pd->policy_description_nolang, pd->lang);
- policy_message = _localize (pd->policy_messages, pd->policy_message_nolang, pd->lang);
+ if (pd->load_descriptions) {
+ group_description = _localize (pd->group_descriptions, pd->group_description_nolang, pd->lang);
+ policy_description = _localize (pd->policy_descriptions, pd->policy_description_nolang, pd->lang);
+ policy_message = _localize (pd->policy_messages, pd->policy_message_nolang, pd->lang);
+ } else {
+ group_description = NULL;
+ policy_description = NULL;
+ policy_message = NULL;
+ }
if (pd->load_descriptions)
_polkit_policy_file_entry_set_descriptions (pfe,