Adding AccessViolationException catch to return true for NullDrawObject
This commit is contained in:
@@ -123,16 +123,22 @@ public class PlayerDataFactory
|
|||||||
{
|
{
|
||||||
if (playerPointer == IntPtr.Zero)
|
if (playerPointer == IntPtr.Zero)
|
||||||
return true;
|
return true;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var character = (Character*)playerPointer;
|
||||||
|
if (character == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
var character = (Character*)playerPointer;
|
var gameObject = &character->GameObject;
|
||||||
if (character == null)
|
if (gameObject == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return gameObject->DrawObject == null;
|
||||||
|
}
|
||||||
|
catch (AccessViolationException)
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
var gameObject = &character->GameObject;
|
|
||||||
if (gameObject == null)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return gameObject->DrawObject == null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool IsCacheFresh(CacheEntry entry)
|
private static bool IsCacheFresh(CacheEntry entry)
|
||||||
|
|||||||
Reference in New Issue
Block a user