private void someFunction() { radioButton1.CheckedChanged -= checkedChangedEventHandler radioButton2.CheckedChanged -= checkedChangedEventHandler if (someObject != null) // throws NullReferenceException...allegedly { if (someObject.Property == something) { // set properties on some UI components } } }
UPDATE
Added some more code. SomeFunction method gets called by the checkedChanged event handlers.
UPDATE 2
The stack trace must be wrong as several of you have suggested. There are no operator overloads, and the method only references four objects that are not UI components (labels and radio buttons), and all of those objects are assigned only once on initialization, and are referenced multiple times before ever getting to this mobdro code so any null references would have been caught way before this. I'll have to look more closely at the calling event handler function.
Comment