sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.68k stars 642 forks source link

Check for null reference before callback #1121

Open TheFreezebug opened 5 years ago

TheFreezebug commented 5 years ago

During high-speed usage, callbacks will throw a null-reference error because the object has been deleted or collected before the callback can be executed on it. Add checks to see if the object is still valid.