Judge to Selena Gomez Sorry, No Permanent Protection ... For Now

11/23/2011 9:15 AM PST

The judge has thrown Selena Gomez a temporary lifeline ... but he's not willing to pull her to shore.

Moments ago, the judge in Selena's alleged stalker case refused to hear the singer's request for a permanent restraining order because Thomas Brodnicki -- who's temporarily in the looney bin -- was unable to appear in court.

Gomez' lawyer mentioned to the judge he could have contacted the court when he was free, but Brodnicki chose to speak with TMZ instead ... so it was his choice whether to contact the court.

Nevertheless, the judge was not moved ... and ruled he would not issue a permanent restraining order until Brodnicki has his day in court

In the meantime, the judge has extended the temporary restraining order so she still has some fleeting protection.

The judges ruling was bizarre because other judges regularly issue permanent restraining orders ... even when the alleged stalker is not in court.

The next hearing is scheduled for Jan. 6.