mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed documentation generic TypeToString crash
This commit is contained in:
parent
c107a33268
commit
11e41558d7
1 changed files with 7 additions and 3 deletions
|
@ -567,10 +567,14 @@ void BfAutoComplete::AddTypeDef(BfTypeDef* typeDef, const StringImpl& filter, bo
|
||||||
{
|
{
|
||||||
if ((CheckDocumentation(entryAdded, NULL)) && (entryAdded->mDocumentation == NULL))
|
if ((CheckDocumentation(entryAdded, NULL)) && (entryAdded->mDocumentation == NULL))
|
||||||
{
|
{
|
||||||
auto typeInst = mModule->ResolveTypeDef(typeDef, BfPopulateType_IdentityNoRemapAlias);
|
auto type = mModule->ResolveTypeDef(typeDef, BfPopulateType_IdentityNoRemapAlias);
|
||||||
StringT<1024> str;
|
StringT<1024> str;
|
||||||
if (typeInst != NULL)
|
if (type != NULL)
|
||||||
str = mModule->TypeToString(typeInst, (BfTypeNameFlags)(BfTypeNameFlag_ExtendedInfo | BfTypeNameFlag_ResolveGenericParamNames));
|
{
|
||||||
|
SetAndRestoreValue<BfTypeInstance*> prevTypeInst(mModule->mCurTypeInstance, type->ToTypeInstance());
|
||||||
|
SetAndRestoreValue<BfMethodInstance*> prevMethodInst(mModule->mCurMethodInstance, NULL);
|
||||||
|
str = mModule->TypeToString(type, (BfTypeNameFlags)(BfTypeNameFlag_ExtendedInfo | BfTypeNameFlag_ResolveGenericParamNames));
|
||||||
|
}
|
||||||
if (typeDef->mTypeDeclaration->mDocumentation != NULL)
|
if (typeDef->mTypeDeclaration->mDocumentation != NULL)
|
||||||
{
|
{
|
||||||
if (!str.IsEmpty())
|
if (!str.IsEmpty())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue