From 9c046840842f66737a8f97a24996b119d0e52ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sun, 30 Aug 2015 14:39:38 +0000 Subject: [PATCH] [INTERPRETER] * BUG: Debugger: Displaying a dynamic variable in a static context does not crash anymore. git-svn-id: svn://localhost/gambas/trunk@7258 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/gbx/gbx_debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/gbx/gbx_debug.c b/main/gbx/gbx_debug.c index 0ca76fb97..4e1536167 100644 --- a/main/gbx/gbx_debug.c +++ b/main/gbx/gbx_debug.c @@ -199,8 +199,10 @@ bool DEBUG_get_value(const char *sym, int len, GB_VARIANT *ret) if (CTYPE_get_kind(gp->ctype) == TK_VARIABLE) { - if (!CTYPE_is_static(gp->ctype) && DEBUG_info->op) + if (!CTYPE_is_static(gp->ctype)) { + if (!DEBUG_info->op) + continue; var = &DEBUG_info->cp->load->dyn[gp->value]; addr = (char *)DEBUG_info->op + var->pos; ref = DEBUG_info->op;