Ver código fonte

fix memory error on finalization (when another theme is selected)

Unknown 6 anos atrás
pai
commit
c5a2b0dcea
1 arquivos alterados com 7 adições e 2 exclusões
  1. 7 2
      bgratheme.pas

+ 7 - 2
bgratheme.pas

@@ -119,10 +119,15 @@ begin
   end;
 end;
 
+var
+  BasicTheme : TBGRATheme;
+
 initialization
-  BGRADefaultTheme := TBGRATheme.Create(nil);
+
+  BasicTheme := TBGRATheme.Create(nil);
+  BGRADefaultTheme := BasicTheme;
 
 finalization
-  FreeAndNil(BGRADefaultTheme);
+  FreeAndNil(BasicTheme);
 
 end.