Runtime: Move calls of check_threads_etc() in mega_apply().
check_threads_etc() may in some circumstances execute code that destructs the object that we are attempting to apply a function in. Make sure to call check_threads_etc() before we check that the object isn't destructed. Otherwise we may be in for a surprise...
Showing with 8 additions and 10 deletions