Commit d316b89b authored by Howard Chu's avatar Howard Chu
Browse files

Fix schema undo crash

parent 2437abac
......@@ -1149,10 +1149,14 @@ config_generic(ConfigArgs *c) {
break;
case CFG_OC: {
CfEntryInfo *ce = c->ca_entry->e_private;
/* can't modify the hardcoded schema */
if ( ce->ce_parent->ce_type == Cft_Global )
return 1;
CfEntryInfo *ce;
/* Can be NULL when undoing a failed add */
if ( c->ca_entry ) {
ce = c->ca_entry->e_private;
/* can't modify the hardcoded schema */
if ( ce->ce_parent->ce_type == Cft_Global )
return 1;
}
}
cfn = c->private;
if ( c->valx < 0 ) {
......@@ -1183,10 +1187,14 @@ config_generic(ConfigArgs *c) {
break;
case CFG_ATTR: {
CfEntryInfo *ce = c->ca_entry->e_private;
/* can't modify the hardcoded schema */
if ( ce->ce_parent->ce_type == Cft_Global )
return 1;
CfEntryInfo *ce;
/* Can be NULL when undoing a failed add */
if ( c->ca_entry ) {
ce = c->ca_entry->e_private;
/* can't modify the hardcoded schema */
if ( ce->ce_parent->ce_type == Cft_Global )
return 1;
}
}
cfn = c->private;
if ( c->valx < 0 ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment