Unhandled Error!

Trying to get property of non-object

Document shop:product
Document type CMS partial
Line 2
Exception class Cms_ExecutionException

Code Highlight

<?
if ($product->images->count):
	$large = array();
	foreach ($product->images as $image) {
		$large[] = $image->getThumbnailPath(353, 'auto', false);
	}
	if ($product->images->count > 1)
	{
		$image_url = $large[0];
	}
	else
	{
		$image_url = $large[0];
# Document Type
2 shop:product CMS partial
1 Product Description Page CMS page