]> git.mxchange.org Git - flightgear.git/commitdiff
delete char array with delete[]
authorTim Moore <timoore@redhat.com>
Sat, 24 Oct 2009 20:49:18 +0000 (22:49 +0200)
committerTim Moore <timoore@redhat.com>
Sat, 24 Oct 2009 20:50:43 +0000 (22:50 +0200)
src/Main/splash.cxx

index 7773171589ecc9b3c12f5b00f257cb6399367ea0..403617891f2027276978b7110de7146a8bcfc845 100644 (file)
@@ -185,6 +185,7 @@ static osg::Node* fgCreateSplashCamera()
 
   char *namestring = genNameString();
   fgSetString("/sim/startup/program-name", namestring);
+  delete[] namestring;
 
   SGPath tpath( globals->get_fg_root() );
   if (splash_texture == NULL || !strcmp(splash_texture, "")) {
@@ -303,7 +304,6 @@ static osg::Node* fgCreateSplashCamera()
   text->setPosition(osg::Vec3(0, 0.92, 0));
   text->setAlignment(osgText::Text::CENTER_CENTER);
   prop = fgGetNode("/sim/startup/program-name", "FlightGear");
-  delete namestring;
   text->setUpdateCallback(new FGSplashTextUpdateCallback(prop));
   geode->addDrawable(text);