aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/rust-parse.c')
-rw-r--r--gdb/rust-parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/rust-parse.c b/gdb/rust-parse.c
index 489be4b..72b843e 100644
--- a/gdb/rust-parse.c
+++ b/gdb/rust-parse.c
@@ -373,7 +373,9 @@ rust_parser::crate_name (const std::string &name)
std::string
rust_parser::super_name (const std::string &ident, unsigned int n_supers)
{
- const char *scope = block_scope (pstate->expression_context_block);
+ const char *scope = "";
+ if (pstate->expression_context_block != nullptr)
+ scope = block_scope (pstate->expression_context_block);
int offset;
if (scope[0] == '\0')