Skip to content

Commit

Permalink
Merge pull request emacs-mirror#5 from grahamc/schema-source-lookup
Browse files Browse the repository at this point in the history
pgtkfns: g_settings_schema_source_lookup can return NULL
  • Loading branch information
Yuuki Harano committed Nov 20, 2019
2 parents 5f4d8a2 + 9fa4924 commit 138460e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pgtkfns.c
Original file line number Diff line number Diff line change
Expand Up @@ -1723,6 +1723,10 @@ parse_resource_key (const char *res_key, char *setting_key)
/* check existence of setting_key */
GSettingsSchemaSource *ssrc = g_settings_schema_source_get_default ();
GSettingsSchema *scm = g_settings_schema_source_lookup (ssrc, SCHEMA_ID, FALSE);
if (scm == NULL) {
return NULL;
}

if (!g_settings_schema_has_key (scm, setting_key)) {
g_settings_schema_unref (scm);
return NULL;
Expand Down

0 comments on commit 138460e

Please sign in to comment.