Make "thread apply" use the gdb::option framework
[deliverable/binutils-gdb.git] / gdb / namespace.c
index be998d9d491f13fbf58463b467087b3c3a3e6f8f..62c7214951a765fdc8e56932fbf3f2e2a5984569 100644 (file)
@@ -1,5 +1,5 @@
 /* Code dealing with "using" directives for GDB.
-   Copyright (C) 2003-2018 Free Software Foundation, Inc.
+   Copyright (C) 2003-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -111,8 +111,9 @@ add_using_directive (struct using_direct **using_directives,
   else
     newobj->declaration = declaration;
 
-  memcpy (newobj->excludes, excludes.data (),
-         excludes.size () * sizeof (*newobj->excludes));
+  if (!excludes.empty ())
+    memcpy (newobj->excludes, excludes.data (),
+           excludes.size () * sizeof (*newobj->excludes));
   newobj->excludes[excludes.size ()] = NULL;
 
   newobj->next = *using_directives;
This page took 0.029649 seconds and 4 git commands to generate.