From fba307e79d40425fac9d7947fdfa88a01e3dc0a6 Mon Sep 17 00:00:00 2001 From: Alexander Kyte Date: Wed, 23 Dec 2015 19:15:38 -0500 Subject: [PATCH] [runtime] Make the pdb lookup function return NULL for runtime-generated methods rather than asserting. --- mono/metadata/debug-mono-ppdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mono/metadata/debug-mono-ppdb.c b/mono/metadata/debug-mono-ppdb.c index 46cf3468e5d..cdd5af3f5e8 100644 --- a/mono/metadata/debug-mono-ppdb.c +++ b/mono/metadata/debug-mono-ppdb.c @@ -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); -- 2.25.1