You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user