controller:lib: Added error checking for when dereferencing descriptor
objects.