avcodec/vdpau: do not dereference hwctx before checking it for NULL