Fix Crash when Closing Resource Editor
We need to clear our pointer to the selected lesson before we delete the course containing it.
BUG: 408742 FIXED-IN: 19.08.0