You can pass it a pointer. If you do, the function will resolve to "safeDelete(const Foo *&p)". You'd end up with a const reference to a pointer (note that your call won't work since the type argument needs to be Engine* not Engine, see also below). However it wouldn't work, because, being a const reference, you can't do p = NULL at the end. Remove the const and you're fine. Personally I would define it as "template<typename T> inline void safeDelete(T *&p)" to enforce pointer arguments.
Second, remove the if(p) check! C++ guarantees that using delete on a NULL pointer does nothing. Calling delete on a NULL pointer is completely safe. See also here.
Last, you don't need to specify the type argument in the call. If you just call safeDelete(g_engine) it already works fine, it'll automatically deduce the template argument to be Engine*.
So this is what you'd end up with:
template<typename T>
inline void safeDelete(T *&p)
{
delete p;
p = NULL;
}