No, LM339 is a comparitor and the inputs are swapped. (That's why my first schematic was wrong - I was wiring as I would a LM339) A diode would probably solve the 12V problem - I take it you mean 12V on the cap.
Sorry yes the cap.....I hooked it up just like your schematic (i think) with 100k resistors and a 10k pot and it still drains the cap pretty fast, even without the led, plus the led only stays on for like 1 volt drop.
I tried swapping the inputs on the 339 and nothing. I can't get the 339 to output poo.