medium: ui_resource: Fix crash in resource cleanup (bnc#859570)

Give sensible error message when missing argument.