MEMORANDUM *
Alberto Villescas appeals the district court’s denial of his petition for a writ of habeas corpus. Villescas is currently serving a sentence of 26 years to life in a California correctional facility, following his conviction by a jury on two counts of illegal firearm possession. We review de novo the district court’s denial of the petition, see Beardslee v. Woodford, 358 F.3d 560, 568 (9th Cir.2004), and affirm.
Villescas urges that the state trial court denied him due process by excluding evidence that he had an ongoing and hostile relationship with one of the supervising officers of the Los Angeles Sheriffs Department, and by excluding evidence that the gun found at the time of his arrest was planted by deputies of the Los Angeles Sheriffs Department.
On direct appeal, the California Court of Appeal held that the disputed evidence was properly excluded under California law because it was of marginal relevance, was potentially confusing to the jury and would have consumed undue time. The Court of Appeal ruled further that any error was harmless because Villescas was permitted to introduce evidence in support of his theory that the weapon in question was planted by officers of the Sheriffs Department. These challenged rulings do not conflict with well-settled principles of federal law. See, e.g., Montana v. Egelhoff, 518 U.S. 37, 42-43, 116 S.Ct. 2013, 135 L.Ed.2d 361 (1996) (due process rights are not offended by exclusion of relevant evidence where its probative value is out*614weighed by danger of prejudice or confusion). Habeas relief is therefore unavailable. 28 U.S.C. § 2254(d)(1); Lockyer v. Andrade, 538 U.S. 63, 73, 123 S.Ct. 1166, 155 L.Ed.2d 144 (2003) (quoting Williams v. Taylor, 529 U.S. 362, 405-06, 120 S.Ct. 1495, 146 L.Ed.2d 389 (2000)).
Moreover, trial type errors do not give rise to habeas relief unless the error alleged “had a substantial and injurious effect or influence in determining the jury’s verdict.” Brecht v. Abrahamson, 507 U.S. 619, 637, 113 S.Ct. 1710, 123 L.Ed.2d 353 (1993). Here, Villescas concedes that the evidence excluded by the court would have been cumulative, and would have merely bolstered identical testimony offered at trial, making it extremely unlikely that the court’s ruling had a “substantial and injurious effect or influence” on the jury’s verdict.
Villescas also contends that this exclusion of evidence, coupled with what Villescas calls a “disparaging” remark to counsel by the trial court, demonstrate that the trial court was not impartial. Nothing in the record supports the assertion.
Finally, Villescas contends that his attorney rendered ineffective assistance of counsel during trial. In particular, he notes that counsel failed to object on Miranda grounds when testimony was presented that Villescas stated, in response to questioning by Sheriffs deputies, that there was a gun under the mattress of the bed upon which he was sitting, while handcuffed, prior to his arrest. The officer’s statement and Villescas’s answer, however, fall within the public safety exception to the Miranda doctrine, see New York v. Quarles, 467 U.S. 649, 656, 104 S.Ct. 2626, 81 L.Ed.2d 550 (1984) (holding Miranda warning is not required where police officers ask questions “reasonably prompted by a concern for the public safety”). Counsel’s failure to object cannot form the basis for a claim of ineffective assistance of counsel. See Boag v. Raines, 769 F.2d 1341, 1344 (9th Cir.1985) (failure to raise unmerited objection is not ineffective assistance).
AFFIRMED.
This disposition is not appropriate for publication and may not be cited to or by the courts of this circuit except as provided by 9th Cir. R. 36-3.