Check pointer before dereferencing it (dotnet/coreclr#7930)
authorDmitry-Me <Dmitry-Me@users.noreply.github.com>
Wed, 2 Nov 2016 17:42:41 +0000 (20:42 +0300)
committerDan Moseley <danmose@microsoft.com>
Wed, 2 Nov 2016 17:42:41 +0000 (10:42 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/e568823f22ec1dccc4ea785630c837e776d4ee09

src/coreclr/src/debug/daccess/nidump.cpp

index 5c6c4e4..c07229a 100644 (file)
@@ -1187,12 +1187,12 @@ NativeImageDumper::DumpNativeImage()
             mscorlib->fIsMscorlib = TRUE;
             _ASSERTE(mscorlib->fIsHardbound);
         }
+
+        _ASSERTE(mscorlib != NULL);
         if( mscorlib->fIsHardbound )
         {
             m_isMscorlibHardBound = true;
         }
-
-        _ASSERTE(mscorlib != NULL);
         if( m_isMscorlibHardBound )
         {
             //go through the module to the binder.