From 92927fd25fc633265100acfb4a65a58239bd92b4 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 11 Apr 2009 07:33:42 +0000 Subject: [PATCH] Fix deadlock --- panda/src/grutil/movieTexture.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/panda/src/grutil/movieTexture.cxx b/panda/src/grutil/movieTexture.cxx index 5c71f0e0a9..3e61490ad8 100644 --- a/panda/src/grutil/movieTexture.cxx +++ b/panda/src/grutil/movieTexture.cxx @@ -214,7 +214,7 @@ do_read_one(const Filename &fullpath, const Filename &alpha_fullpath, bool header_only, BamCacheRecord *record) { nassertr(n == 0, false); - nassertr(z >= 0 && z < get_z_size(), false); + nassertr(z >= 0 && z < _z_size, false); if (record != (BamCacheRecord *)NULL) { record->add_dependent_file(fullpath); @@ -238,7 +238,8 @@ do_read_one(const Filename &fullpath, const Filename &alpha_fullpath, if (!has_name()) { set_name(fullpath.get_basename_wo_extension()); } - if (!has_filename()) { + // Don't use has_filename() here, it will cause a deadlock + if (_filename.empty()) { _filename = fullpath; _alpha_filename = alpha_fullpath; }