From 4b35572f290eec22d5ca417640d68ccd5ba8d92a Mon Sep 17 00:00:00 2001 From: dimitr Date: Thu, 17 May 2012 09:10:13 +0000 Subject: [PATCH] One more correction. This restores the accidentally changed original logic. --- src/jrd/par.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/jrd/par.cpp b/src/jrd/par.cpp index 6ebbc0cf6d..06a2862e4c 100644 --- a/src/jrd/par.cpp +++ b/src/jrd/par.cpp @@ -1390,11 +1390,13 @@ static jrd_nod* par_field(thread_db* tdbb, CompilerScratch* csb, SSHORT blr_oper { fb_assert(id >= 0); - if (temp_rel->rel_fields && id < (int) temp_rel->rel_fields->count()) - { - const jrd_fld* const field = (*temp_rel->rel_fields)[id]; + jrd_fld* field; - if (field && field->fld_default_value && field->fld_not_null) + if (temp_rel->rel_fields && + id < (int) temp_rel->rel_fields->count() && + (field = (*temp_rel->rel_fields)[id])) + { + if (field->fld_default_value && field->fld_not_null) node->nod_arg[e_fld_default_value] = field->fld_default_value; } else if (temp_rel->rel_flags & REL_system)