Unhandled Error!

Trying to get property of non-object

Document Product Category Page
Document type CMS page
Line 1
Exception class Cms_ExecutionException

Code Highlight

<? if ($category->parent==NULL || $category->parent->name=='Catalog') { 
$subcategories = $category->list_children('front_end_sort_order');	
?>
<div class="row wide cat-row dark-grey">
	<div class="twelve columns">
		<ul class="block-grid <?= numToWord($subcategories->count); ?>-up mobile-one-up">
		<? foreach ($subcategories as $sc) { ?>
			<li class="nomar nopad cat-block">
				<a class="" href="<?= $sc->page_url('/products'); ?>">
					<? if($category->name != "Botes") { ?>
					<div style="background: url(<?= site_url() . $sc->images->first->getThumbnailPath('auto', 'auto', false) ?>) center center no-repeat; background-size:cover; min-height:280px;"></div>
					<? } else { ?>
					<div class="img text-center" style="min-height:0;">
# Document Type
1 Product Category Page CMS page