Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 843)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 844)
@@ -2530,5 +2530,5 @@
   TComVPS* vps = NULL;
   vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId());
-  if ( rpcSlice->getLayerId() == 0 )
+  if ( rpcSlice->getLayerId() == 0 && vps->getVpsExtensionFlag() == 1 )
   {
     assert( sps->getPicWidthInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getPicWidthVpsInLumaSamples() );
@@ -2538,5 +2538,5 @@
     assert( sps->getBitDepthC() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsChroma() );
   }
-  else 
+  else if ( vps->getVpsExtensionFlag() == 1 )
   {
     assert(vps->getVpsRepFormat( vps->getVpsRepFormatIdx(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : rpcSlice->getLayerId()))->getPicWidthVpsInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getPicWidthVpsInLumaSamples());
