It worked as expected, but then I tried connecting a TDA2005 audio amplifier. I connected the LM317 to my audio amplifier as a power supply and because I am new to electronics I had some problems with my amplifier. Trying to fix the problems, I probably shorted my circuit accidentally (not sure about it). My LM317 potentiometer burned down with pretty bad smoke.
I was wondering whether could this happen because of shorting the output of the LM317.