Appeal by the defendant from a judgment of the Supreme Court, Kings County (Rienzi, J.), rendered February 17, 1988, convicting him of criminal sale of a controlled substance in the third degree, upon a jury verdict, and imposing sentence.
Ordered that the judgment is affirmed.
Viewing the evidence in the light most favorable to the People (see, People v Contes, 60 NY2d 620), we find that it was legally sufficient to establish the defendant’s guilt beyond a reasonable doubt. Moreover, upon the exercise of our factual review power, we are satisfied that the verdict of guilt was not against the weight of the evidence (see, GPL 470.15 [5]).
The defendant’s contention that the court erred when it closed the courtroom is without merit. The court conducted a hearing during which it was shown that the undercover officer was still engaged in several pending investigations in Brooklyn at the time of the trial and that closure was necessary to *657protect his safety arid the integrity of his ongoing operations (see, People v Jones, 47 NY2d 409, 413, cert denied 444 US 946; People v Hinton, 31 NY2d 71, 73, cert denied 410 US 911; People v Flores, 152 AD2d 704). Mangano, P. J., Eiber, Sullivan and Balletta, JJ., concur.