mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-23 20:17:58 +03:00
Null pointer check fix
This commit is contained in:
parent
6e7afc1ac9
commit
b7564630cd
@ -47,6 +47,9 @@ namespace Facepunch.Steamworks.Interop
|
||||
|
||||
FillInterfaces( steamworks, hUser, hPipe );
|
||||
|
||||
if ( !user.IsValid )
|
||||
return false;
|
||||
|
||||
// Ensure that the user has logged into Steam. This will always return true if the game is launched
|
||||
// from Steam, but if Steam is at the login prompt when you run your game it will return false.
|
||||
if ( !user.BLoggedOn() )
|
||||
|
@ -19,7 +19,7 @@ namespace Generator
|
||||
StartBlock( $"internal class {type} : Interface" );
|
||||
{
|
||||
WriteLine( "internal IntPtr _ptr;" );
|
||||
WriteLine( "public bool IsValid { get{ return _ptr != null; } }" );
|
||||
WriteLine( "public bool IsValid { get{ return _ptr != IntPtr.Zero; } }" );
|
||||
WriteLine();
|
||||
|
||||
WriteLine( "//" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user