vatrace: check the pointer against NULL before using it
vatrace: check the pointer against NULL before using it

Signed-off-by: Xiang, Haihao <8d677183e5993577d4fa73a419b76987913292d6@intel.com>
(cherry picked from commit 7ae3f1f3666e3571774a9b98ee6571433dcc73d5)

01org/libva-cros,zzhhui/libva,gbeauchesne/libva,zzhhui/libva,zzhhui/libva,pma1/libva,01org/iotg-lin-gfx-libva,chenxianqin/vaapi-libva,pma1/libva,01org/iotg-lin-gfx-libva,pma1/libva,01org/iotg-lin-gfx-libva,gbeauchesne/libva,01org/libva-cros,01org/libva-cros,gbeauchesne/libva,chenxianqin/vaapi-libva,chenxianqin/vaapi-libva