Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5241 in orxonox.OLD for trunk/src/lib/gui


Ignore:
Timestamp:
Sep 24, 2005, 12:12:58 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: minor gui-fixes…

Location:
trunk/src/lib/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gui_exec.cc

    r5021 r5241  
    206206  char* fileName = ResourceManager::homeDirCheck(confFile);
    207207  iniParser.writeFile(fileName);
    208   delete fileName;
     208  delete[] fileName;
    209209}
    210210
     
    243243  if(widget->optionType > GUI_NOTHING)
    244244    if (static_cast<Option*>(widget)->isSaveable())
    245       parser->addVar(static_cast<Option*>(widget)->title, static_cast<Option*>(widget)->save());
     245    {
     246      char* saveName = static_cast<Option*>(widget)->save();
     247      parser->addVar(static_cast<Option*>(widget)->title, saveName);
     248      delete[] saveName;
     249    }
    246250
    247251  if(widget->next != NULL)
     
    257261  char* fileName = ResourceManager::homeDirCheck(confFile);
    258262  IniParser iniParser(fileName);
    259   delete fileName;
     263  delete[] fileName;
    260264  if (!iniParser.isOpen())
    261265    return;
  • trunk/src/lib/gui/gui_gtk.cc

    r5015 r5241  
    15941594char* OptionLabel::save()
    15951595{
    1596   return cValue;
     1596  char* retVal = new char[strlen(cValue)+1];
     1597  strcpy(retVal, cValue);
     1598  return retVal;
    15971599}
    15981600
  • trunk/src/lib/gui/gui_keys.cc

    r5020 r5241  
    133133    pKeyWindow->fill(pKeyFrame);
    134134  }
    135   delete windowName;
     135  delete[] windowName;
    136136  Window::addWindow(pKeyWindow);
    137137#ifdef HAVE_GTK2
  • trunk/src/lib/gui/gui_update.cc

    r4944 r5241  
    117117      tmpName[strlen(fileName)-strlen(DATA_IDENTIFIER)] = '\0';
    118118      static_cast<OptionLabel*>(object)->setValue(tmpName);
    119       delete tmpName;
     119      delete[] tmpName;
    120120      return true;
    121121    }
Note: See TracChangeset for help on using the changeset viewer.