diff --git a/panda/src/rocket/rocketFileInterface.cxx b/panda/src/rocket/rocketFileInterface.cxx index 315c34610f..30ef03899f 100644 --- a/panda/src/rocket/rocketFileInterface.cxx +++ b/panda/src/rocket/rocketFileInterface.cxx @@ -37,9 +37,15 @@ Rocket::Core::FileHandle RocketFileInterface:: Open(const Rocket::Core::String& path) { rocket_cat.debug() << "Opening " << path.CString() << "\n"; + Filename fn = Filename::from_os_specific(path.CString()); + void *ptr = (void*) _vfs->open_read_file(fn, true); + + if (ptr == NULL) { + rocket_cat.error() << "Failed to open " << fn << "\n"; + } + // A FileHandle is actually just a void pointer - return (Rocket::Core::FileHandle) - _vfs->open_read_file(Filename::from_os_specific(path.CString()), true); + return (Rocket::Core::FileHandle) ptr; } ////////////////////////////////////////////////////////////////////