Fix deadlock

This commit is contained in:
rdb 2009-04-11 07:33:42 +00:00
parent 5becdfcf7f
commit 92927fd25f
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}