"CSI" star Gary Dourdan was in court for his domestic violence case and the judge was NOT pleased -- chastising the actor for violating a protective order by texting his ex-girlfriend.
Gary was in court to reschedule a prelim hearing, but also got chewed out by the judge because the prosecutor says Gary sent his ex-GF a text message on December 24th -- wishing her a "Merry Christmas" -- and then called her.
The judge let Gary off with a stern warning -- making it clear ... the actor would be remanded into custody if he tried to contact her again. He's due back in court February 15.
TMZ broke the story ... Gary's ex-girlfriend obtained a restraining order against the actor after he allegedly broke her nose back in November.
It might have been the worst possible day to be in court too -- the same day as Lindsay Lohan's progress report hearing -- because every news outlet on the planet was swarming the courthouse.
'CSI' Star Gary Dourdan
A Little Reminder from Hizzoner:
STOP TEXTING YOUR EX!!!
1/17/2012 1:45 PM PST BY TMZ STAFF
Get TMZ Breaking News alerts to your inbox