Browse Source

Memory leak im editor behoben

Kolja Strohm 5 years ago
parent
commit
19b9ad492f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Asteroids/Editor/Editor.cpp

+ 2 - 2
Asteroids/Editor/Editor.cpp

@@ -91,11 +91,11 @@ void AsteroidsEditor::setLadeAnimation( Animation2D * la )
 void AsteroidsEditor::setSichtbar()
 {
     status = START;
-    EditorKlient *k = klient->getThis();
-    TextRenderer *zS = new TextRenderer( schrift->getThis() );
     Punkt mS = windowSize;
     if( windowSize != Punkt() )
     {
+        EditorKlient *k = klient->getThis();
+        TextRenderer *zS = new TextRenderer( schrift->getThis() );
         new AsynchronCall( [ this, k, zS, mS ]( void ) -> void
         {
             int ret = k->init();