mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Throw error if interface_pointer is null
This commit is contained in:
parent
feec8f6842
commit
d91ba6d84a
@ -430,6 +430,7 @@ private void Detect_InterfaceReturn( List<Argument> argList, List<Argument> call
|
||||
ReturnVar = "interface_pointer";
|
||||
ReturnType = ReturnType.Substring( 1 ).Trim( '*', ' ' );
|
||||
|
||||
AfterLines.Add( $"if ( interface_pointer == IntPtr.Zero ) throw new System.Exception( $\"Error getting interface {{pchVersion}}\");" );
|
||||
AfterLines.Add( $"return new {ReturnType}( steamworks, interface_pointer );" );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user