Index: source/Commands/CommandObjectProcess.cpp
===================================================================
--- source/Commands/CommandObjectProcess.cpp	(revision 153764)
+++ source/Commands/CommandObjectProcess.cpp	(working copy)
@@ -865,6 +865,13 @@
         
         if (command.GetArgumentCount() == 1)
         {
+        	if (target_sp->GetExecutableModule() == NULL)
+        	{
+                result.AppendError("No executable module has been loaded");
+                result.SetStatus (eReturnStatusFailed);
+                return false;
+        	}
+
             const char *plugin_name = NULL;
             if (!m_options.plugin_name.empty())
                 plugin_name = m_options.plugin_name.c_str();
@@ -880,6 +887,7 @@
                 {
                     result.AppendError(error.AsCString("Remote connect failed"));
                     result.SetStatus (eReturnStatusFailed);
+                    target_sp->DeleteCurrentProcess();
                     return false;
                 }
             }
