Opinion
March 14, 1997.
Judgment unanimously affirmed.
Present — Denman, P.J., Pine, Doerr, Balio and Fallon, JJ.
The waiver of appeal does not preclude the challenge by defendant to the legality of his sentence ( see, People v Seaberg, 74 NY2d 1, 9) or his contention that he was denied effective assistance of counsel on his motion to withdraw the plea and for reassignment of counsel ( see, People v Hayes, 194 AD2d 998; People v Ferguson, 192 AD2d 800, lv denied 82 NY2d 717).
By pleading guilty on condition that he admit that he is a second felony offender, defendant waived his right to a hearing on that issue ( see, People v Stephens, 193 AD2d 1087, lv denied 82 NY2d 727; People v Cates, 104 AD2d 895, 896). In any event, County Court afforded defendant adequate opportunity to challenge the constitutionality of his prior conviction and properly rejected that challenge.
There is no merit to the contention that defendant was denied effective assistance of counsel because his attorney became an adverse witness on defendant's pro se motion to withdraw the plea and for reassignment of counsel. The court decided that part of the motion seeking reassignment of counsel before counsel made the alleged adverse statement concerning his efforts as counsel and, thus, defendant was not prejudiced by that statement and was not denied effective assistance of counsel ( see, People v Jones, 233 AD2d 944; People v Maragh, 208 AD2d 563, lv denied 84 NY2d 1013; People v Rodriguez, 189 AD2d 684, lv denied 81 NY2d 892). (Appeal from Judgment of Erie County Court, Rogowski, J. — Burglary, 3rd Degree.)