mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
generator: fix possible unhandled KeyNotFoundException (regression)
This regression surfaced after82a957bc9d
[1], when many collections were migrated to generic collections. HashTables simply return null when queried for certain key, while Dictionary objects throw KeyNotFoundException. The regression could be noticed, more particularly, when trying to compile the gtk3 branch of the gudevsharp project [2]. [1]82a957bc9d
[2] https://github.com/mono/gudev-sharp/commits/gtk3
This commit is contained in:
parent
4046a4c4bd
commit
9327d7d085
@ -214,7 +214,12 @@ namespace GtkSharp.Generation {
|
||||
IGeneratable cur_type = null;
|
||||
while (types.TryGetValue (type, out cur_type) && cur_type is AliasGen) {
|
||||
IGeneratable igen = cur_type as AliasGen;
|
||||
types [type] = types [igen.Name];
|
||||
|
||||
IGeneratable new_type;
|
||||
if (!types.TryGetValue (igen.Name, out new_type))
|
||||
new_type = null;
|
||||
|
||||
types [type] = new_type;
|
||||
type = igen.Name;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user