I didn't manage to reproduce this problem. Calling oapiGetBaseByName with a valid OBJHANDLE for a planetary body (planet or moon) and a nonexisting base name should have returned 0. The function should have been unchanged from 2010-P1.
I have now (SVN r.30) modified the function to catch non-planetary body OBJHANDLEs. (this should now also return 0, rather than crashing). However, the OBJHANDLE parameter must still be a handle to a valid (and non-deleted) object. Passing an invalid handle will still CTD.
Can you check if the function now behaves how you'd expect?