Guard against 'current_directory == NULL' on gdb_abspath (PR gdb/23613)
[deliverable/binutils-gdb.git] / gdb / gdbsupport / pathstuff.c
index fafecd543d3b21b362a8ee471aa66608c781526f..aa51e8f36eb8c7abaff8599ac9d354b4d62be608 100644 (file)
@@ -134,7 +134,7 @@ gdb_abspath (const char *path)
   if (path[0] == '~')
     return gdb_tilde_expand_up (path);
 
-  if (IS_ABSOLUTE_PATH (path))
+  if (IS_ABSOLUTE_PATH (path) || current_directory == NULL)
     return make_unique_xstrdup (path);
 
   /* Beware the // my son, the Emacs barfs, the botch that catch...  */
This page took 0.024182 seconds and 4 git commands to generate.