From 2a708a74d0a2e9a26caeb6bacf9f252102c89326 Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 8 May 2008 18:31:08 +0000 Subject: added "inherited ..." to all constructors to assure that the base-class constructor is called. Different to C or Java, the constructor or destructor of the base class (except that of TObject) is not called by default if "inherited ..." is not given (very strange). This is no problem with classes inherited directly from TObject, because the TObject constructor is always called (and sets the values of the fields to 0-values) but i added inherited to these constructors too because the base class may change from TObject to something different and the "inherited" will probably not added in this case and causing problems. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1070 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Menu/UMenu.pas | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Game/Code/Menu/UMenu.pas') diff --git a/Game/Code/Menu/UMenu.pas b/Game/Code/Menu/UMenu.pas index 9edf1e00..7656c639 100644 --- a/Game/Code/Menu/UMenu.pas +++ b/Game/Code/Menu/UMenu.pas @@ -180,6 +180,8 @@ end; constructor TMenu.Create; begin + inherited; + Fade := 0;//fWhite; SetLength(Static, 0); -- cgit v1.2.3