[runtime] Make the pdb lookup function return NULL for runtime-generated methods...
authorAlexander Kyte <alexmkyte@fastmail.com>
Thu, 24 Dec 2015 00:15:38 +0000 (19:15 -0500)
committerAlexander Kyte <alexmkyte@fastmail.com>
Thu, 24 Dec 2015 00:15:38 +0000 (19:15 -0500)
mono/metadata/debug-mono-ppdb.c

index 46cf3468e5db286e541bc687d15daa36a15249d2..cdd5af3f5e80b99a63bfb450f93dfdf70efaac0b 100644 (file)
@@ -291,7 +291,8 @@ mono_ppdb_lookup_location (MonoDebugMethodInfo *minfo, uint32_t offset)
        gboolean first = TRUE, first_non_hidden = TRUE;
        MonoDebugSourceLocation *location;
 
-       g_assert (method->token);
+       if (!method->token)
+               return NULL;
 
        idx = mono_metadata_token_index (method->token);