My Peavey ValveKing 112 started making a crackling sound yesterday. It started shortly after (maybe immediately) after I turned it on. It was kind of like the sound you get when you tap on the end of a guitar cord that's plugged in. The noise started happening more often as the amp stayed on for longer. I turned it off after a minute or two. I tried turning it on again a couple of times later and it still happened, getting worse the longer the amp stayed on.

I got my dad to have a look at the amp (I'm not that good with this sort of stuff), and he pulled out all the preamp tubes, straightened their pins (for some reason they were all a bit bent) put them back and turned all the knobs to improve any bad connections. After that the crackling stopped.

Do you think that the problem was that something had corroded and was getting a bad connection? The amp is about 9 months old, which made me think that it wasn't old enough for corrosion? Could there be something wrong with the tubes (or anything else)? I'm just worried that there could still be something wrong with it and that playing it might cause damage?

Thanks in advance for your helpful replies.
Bent pins could easily have been causing it. Just pulling them out and reseating them will often do the trick. The act of doing that can also clean the socket. What I'd do is get some contact cleaner, spray it liberally on the pins, work it in and out of the socket three or four times to clean it. Stick them back in and you're done.
If it keeps happening the sockets need replacing.
Gilchrist custom
Yamaha SBG500
Randall RM100 & RM20
Marshall JTM45 clone
Marshall JCM900 4102 (modded)
Marshall 18W clone
Fender 5F1 Champ clone
Atomic Amplifire
Marshall 1960A
Boss GT-100

Cathbard Amplification
My band