Check weston_head_from_resource for NULL return
If the compositor is disabling a weston_output, weston_head_from_resource can return NULL, so the return code must be checked where used.
Fixes #638 (closed)
Signed-off-by: Joshua Watt JPEWhacker@gmail.com