A couple more bugs fixes from Coverity

Fixing a couple more issues which coverity found.

The more important is the PVR db fix.  I believe that the current code would try and upgrade a very old PVR database due to the signature not matching the base class, and so the base class using it's version which returns 0.