Denise Richards and Charlie Sheen are currently in an L.A. court where a judge is ruling on the temporary custody Richards was granted of Sheen and Brooke Mueller's twins, TMZ is reporting. The court is expected to decide whether Brooke will get the kids back when she leaves rehab -- otherwise Richards could be granted full custody or, perhaps, shared custody with Sheen.

The L.A. County of Department of Children & Family Services removed four-year-olds Bob and Max from Mueller's home last Thursday after the county deemed the living environment unsafe due to Mueller's suspected drug use.

Mueller is now being treated at UCLA Medical Center. Her rep Steve Honig said she will later transition into a residential treatment facility for prescription drug abuse, marking her 20th rehab stint.

Richards has cared for the twin boys during Mueller's past trips to rehab. She also has two biological children and one adopted daughter of her own.

Question is ... why isn't Sheen fighting to keep his kids?

As anticipated, the judge ruled that Richards will maintain custody of the kids for now. The twins also attended today's hearing.