Selaa lähdekoodia

Fixed memory leak in Form::create

Darryl Gough 12 vuotta sitten
vanhempi
sitoutus
bedd0e691d
2 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 2 0
      gameplay/src/Form.cpp
  2. 1 0
      gameplay/src/Properties.cpp

+ 2 - 0
gameplay/src/Form.cpp

@@ -136,6 +136,8 @@ Form* Form::create(const char* url)
 
     __forms.push_back(form);
 
+	SAFE_DELETE(properties);
+
     return form;
 }
 

+ 1 - 0
gameplay/src/Properties.cpp

@@ -97,6 +97,7 @@ Properties* Properties::create(const char* url)
     if (!p)
     {
         GP_WARN("Failed to load properties from url '%s'.", url);
+		SAFE_DELETE(properties);
         return NULL;
     }