dpms: add null checking of 'dpms->res' variable