[Lldb-commits] [lldb] r200402 - Don't crash when trying to auto complete 'breakpoint set -n "_'

Greg Clayton gclayton at apple.com
Wed Jan 29 10:25:08 PST 2014


Author: gclayton
Date: Wed Jan 29 12:25:07 2014
New Revision: 200402

URL: http://llvm.org/viewvc/llvm-project?rev=200402&view=rev
Log:
Don't crash when trying to auto complete 'breakpoint set -n "_'

<rdar://problem/15921898>


Modified:
    lldb/trunk/source/Interpreter/Options.cpp

Modified: lldb/trunk/source/Interpreter/Options.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Options.cpp?rev=200402&r1=200401&r2=200402&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Options.cpp (original)
+++ lldb/trunk/source/Interpreter/Options.cpp Wed Jan 29 12:25:07 2014
@@ -952,7 +952,7 @@ Options::HandleOptionArgumentCompletion
 
             // If this is the "shlib" option and there was an argument provided,
             // restrict it to that shared library.
-            if (strcmp(cur_opt_name, "shlib") == 0 && cur_arg_pos != -1)
+            if (cur_opt_name && strcmp(cur_opt_name, "shlib") == 0 && cur_arg_pos != -1)
             {
                 const char *module_name = input.GetArgumentAtIndex(cur_arg_pos);
                 if (module_name)





More information about the lldb-commits mailing list