Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

How come this exception fires sometimes?

$
0
0
On some android phones the SomeException is thrown from SomeFunction (see below) once in a while.

How is that possible since GetShadowTag() should never be able to return null?
Can you spot something I missed?

EDIT:
BTW: The code is single threaded.

Code (CSharp):
  1. void SomeFunction()
  2. {
  3.   if (obj != null)
  4.   {
  5.     ShadowTag tag = GetShadowTag(obj);
  6.     if (tag == null)
  7.       throw new SomeException();
  8.   }
  9. }
  10.  
  11. ShadowTag GetShadowTag(IShadowable obj)
  12. {
  13.   if (obj.SYS_Tag == null)
  14.   {...
How come this exception fires sometimes?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>