Call to a member function getObj() on null