Camera won't work in my iPhone 4?

When I unlock my phone and click on to the camera it's just black and nothing shows up, but if I open the camera while its locked it works. This has never happened before. What's wrong. With my phone?

Power your phone down. Then turn on my holding the home button and sleep/wake button for 5 seconds