You should pose this question to a lawyer who knows the charge, why the testimony was offered, and can review the transcripts for objections, proper preservation of error, and other issues involved in the case.
Also, as this appears to have been a choice by the defendant and his attorney, they would ordinarily have grave difficulty trying to blame the judge for the consequence of their choice to elicit testimony from their own witness.

