unload default attrlayer causes crash on multiple /rehash
it's not required to destroy it first to load possible new default attributes https://github.com/pvpgn/pvpgn-server/issues/429
This commit is contained in:
parent
207c707ebd
commit
f707680980
1 changed files with 8 additions and 6 deletions
|
@ -60,13 +60,15 @@ namespace pvpgn
|
|||
|
||||
extern int attrlayer_load_default(void)
|
||||
{
|
||||
if (defattrs) attrlayer_unload_default();
|
||||
|
||||
defattrs = attrgroup_create_storage(storage->get_defacct());
|
||||
if (!defattrs) {
|
||||
eventlog(eventlog_level_error, __FUNCTION__, "could not create attrgroup");
|
||||
return -1;
|
||||
if (defattrs == NULL) {
|
||||
defattrs = attrgroup_create_storage(storage->get_defacct());
|
||||
if (!defattrs) {
|
||||
eventlog(eventlog_level_error, __FUNCTION__, "could not create attrgroup");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
// reset flag to load possible new default attributes
|
||||
defattrs->flags = ATTRGROUP_FLAG_NONE;
|
||||
|
||||
return attrgroup_load(defattrs, "BNET");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue