mirror of
https://github.com/godotengine/godot.git
synced 2025-10-30 13:11:13 +00:00
C#: Guard against null assemblies
A symbol's containing assembly will be null if the symbol is shared across multiple assemblies.
This commit is contained in:
parent
8e14f9ba21
commit
f6d60764d3
2 changed files with 7 additions and 7 deletions
|
|
@ -29,7 +29,7 @@ namespace Godot.SourceGenerators
|
|||
{
|
||||
while (symbol != null)
|
||||
{
|
||||
if (symbol.ContainingAssembly.Name == assemblyName &&
|
||||
if (symbol.ContainingAssembly?.Name == assemblyName &&
|
||||
symbol.ToString() == typeFullName)
|
||||
{
|
||||
return true;
|
||||
|
|
@ -47,7 +47,7 @@ namespace Godot.SourceGenerators
|
|||
|
||||
while (symbol != null)
|
||||
{
|
||||
if (symbol.ContainingAssembly.Name == "GodotSharp")
|
||||
if (symbol.ContainingAssembly?.Name == "GodotSharp")
|
||||
return symbol;
|
||||
|
||||
symbol = symbol.BaseType;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue