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,7 +430,8 @@ private void Detect_InterfaceReturn( List<Argument> argList, List<Argument> call
|
|||||||
ReturnVar = "interface_pointer";
|
ReturnVar = "interface_pointer";
|
||||||
ReturnType = ReturnType.Substring( 1 ).Trim( '*', ' ' );
|
ReturnType = ReturnType.Substring( 1 ).Trim( '*', ' ' );
|
||||||
|
|
||||||
AfterLines.Add( $"return new {ReturnType}( steamworks, interface_pointer );" );
|
AfterLines.Add( $"if ( interface_pointer == IntPtr.Zero ) throw new System.Exception( $\"Error getting interface {{pchVersion}}\");" );
|
||||||
|
AfterLines.Add( $"return new {ReturnType}( steamworks, interface_pointer );" );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Detect_VectorReturn( List<Argument> argList, List<Argument> callArgs )
|
private void Detect_VectorReturn( List<Argument> argList, List<Argument> callArgs )
|
||||||
|
Loading…
Reference in New Issue
Block a user