[CP] fix core when create_tg_tenant with no_memory

This commit is contained in:
obdev
2024-02-07 16:41:49 +00:00
committed by ob-robot
parent 63fd9bd120
commit aceabf03d5
2 changed files with 10 additions and 6 deletions

View File

@ -35,10 +35,12 @@ namespace share
{
void ob_init_create_func()
{
#define TG_DEF(id, name, type, args...) \
#define TG_DEF(id, name, type, args...) \
lib::create_funcs_[lib::TGDefIDs::id] = []() { \
auto ret = OB_NEW(TG_##type, SET_USE_500("tg"), args); \
ret->attr_ = {#name, TGType::type}; \
TG_##type *ret = OB_NEW(TG_##type, SET_USE_500("tg"), args); \
if (NULL != ret) { \
ret->attr_ = {#name, TGType::type}; \
} \
return ret; \
};
#include "share/ob_thread_define.h"