aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport
diff options
context:
space:
mode:
Diffstat (limited to 'gdbsupport')
-rw-r--r--gdbsupport/gdb-checked-static-cast.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdbsupport/gdb-checked-static-cast.h b/gdbsupport/gdb-checked-static-cast.h
index cc29873..bc75244 100644
--- a/gdbsupport/gdb-checked-static-cast.h
+++ b/gdbsupport/gdb-checked-static-cast.h
@@ -54,6 +54,9 @@ checked_static_cast (V *v)
"types must be related");
#ifdef DEVELOPMENT
+ if (v == nullptr)
+ return nullptr;
+
T result = dynamic_cast<T> (v);
gdb_assert (result != nullptr);
#else