Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7201 in orxonox.OLD for trunk/src/lib/shell


Ignore:
Timestamp:
Mar 9, 2006, 12:51:06 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: no more segfaults

Location:
trunk/src/lib/shell
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_command.cc

    r7199 r7201  
    4444  this->alias = NULL;
    4545  this->executor = executor.clone();
     46  this->executor->setName(commandName);
    4647
    4748//  this->classID = classID;
     
    6970ShellCommand* ShellCommand::registerCommand(const char* commandName, const char* className, const Executor& executor)
    7071{
    71   if (ShellCommand::isRegistered(commandName, className, executor))
     72  if (ShellCommand::isRegistered(commandName, className))
    7273    return NULL;
    7374  else
     
    114115 * @param commandName the name of the Command
    115116 * @param className the name of the Class the command should apply to.
    116  * @param paramCount how many arguments the Command takes
    117117 * @returns true, if the command is registered/false otherwise
    118118 *
     
    120120 * This is checked in the registerCommand-function.
    121121 */
    122 bool ShellCommand::isRegistered(const char* commandName, const char* className, const Executor& executor)
     122bool ShellCommand::isRegistered(const char* commandName, const char* className)
    123123{
    124124  if (ShellCommandClass::commandClassList == NULL)
     
    304304                                          const MultiType& value4)
    305305{
    306   if (this == NULL)
     306  if (this == NULL || this->executor == NULL)
    307307    return NULL;
    308308
  • trunk/src/lib/shell/shell_command.h

    r7198 r7201  
    7979    ~ShellCommand();
    8080
    81     static bool isRegistered(const char* commandName, const char* className, const Executor& executor);
     81    static bool isRegistered(const char* commandName, const char* className);
    8282    static const char* paramToString(long parameter);
    8383
Note: See TracChangeset for help on using the changeset viewer.