none
Object reference not set to an instance of an object. RRS feed

  • Question

  • Help :( I get this error. I don't know what to do, It runs fine after running it, after I selected the window and run again I got this NullReferenceException

    Monday, January 23, 2012 3:09 PM

Answers

  • This is because the SkeletonFrameReadyEventArgs object does not contain any SkeletonFrame information. 

     

    Just add this line to the top of the method:

     

    if (e.SkeletonFrame == null)

    return;

    • Marked as answer by Ricardo Pascua Tuesday, January 24, 2012 4:48 PM
    Tuesday, January 24, 2012 7:54 AM

All replies

  • This is because the SkeletonFrameReadyEventArgs object does not contain any SkeletonFrame information. 

     

    Just add this line to the top of the method:

     

    if (e.SkeletonFrame == null)

    return;

    • Marked as answer by Ricardo Pascua Tuesday, January 24, 2012 4:48 PM
    Tuesday, January 24, 2012 7:54 AM
  • Thank you soo much :)) its working!
    Tuesday, January 24, 2012 4:49 PM