When there are no products in a category being displayed by a shortcode, we get undefined errors due to ->post being null.  This resolves that.