Fix a case where a pointer was being used before its null check in MediaEngine.cpp