Fixed a bug with shaders causing an assert when object is attached to a custom_object_widget.