Don't use TUI_DISASM_WIN in tui_disasm_window method
[deliverable/binutils-gdb.git] / gdb / namespace.c
index a851ce9b5f915f694840e228ced765c7f4e10658..62c7214951a765fdc8e56932fbf3f2e2a5984569 100644 (file)
@@ -1,5 +1,5 @@
 /* Code dealing with "using" directives for GDB.
-   Copyright (C) 2003-2017 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.025825 seconds and 4 git commands to generate.