File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
src/Core/Silk.NET.Core/Contexts Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 4
4
#nullable enable
5
5
using System ;
6
6
using System . Linq ;
7
+ using Silk . NET . Core . Loader ;
7
8
8
9
namespace Silk . NET . Core . Contexts
9
10
{
@@ -30,16 +31,13 @@ public MultiNativeContext(params INativeContext?[] contexts)
30
31
/// <inheritdoc />
31
32
public nint GetProcAddress ( string proc , int ? slot = default )
32
33
{
33
- foreach ( var nativeContext in Contexts )
34
+ if ( ! TryGetProcAddress ( proc , out var ret , slot ) )
34
35
{
35
- var ret = nativeContext ? . GetProcAddress ( proc , slot ) ?? default ;
36
- if ( ret != default )
37
- {
38
- return ret ;
39
- }
36
+ static void Throw ( string fn ) => throw new SymbolLoadingException ( fn ) ;
37
+ Throw ( proc ) ;
40
38
}
41
39
42
- return default ;
40
+ return ret ;
43
41
}
44
42
45
43
/// <inheritdoc />
You can’t perform that action at this time.
0 commit comments