2
0
David Rose 23 жил өмнө
parent
commit
af5c5c55b7

+ 3 - 2
panda/src/pgraph/loader.cxx

@@ -109,12 +109,13 @@ find_all_files(const Filename &filename, Loader::Results &results) const {
 
 
       } else {
       } else {
         // Local filename, search along the path.
         // Local filename, search along the path.
+        const DSearchPath &model_path = get_model_path();
         DSearchPath::Results files;
         DSearchPath::Results files;
         if (use_vfs) {
         if (use_vfs) {
           VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
           VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
-          num_added = vfs->find_all_files(filename, get_model_path(), files);
+          num_added = vfs->find_all_files(filename, model_path, files);
         } else {
         } else {
-          num_added = get_model_path().find_all_files(filename, files);
+          num_added = model_path.find_all_files(filename, files);
         }
         }
         
         
         for (int i = 0; i < num_added; i++) {
         for (int i = 0; i < num_added; i++) {