I've got a very stark class.
unit StuffClass;
{$mode objfpc}{$H+}
interface
type
TStuffClass = class
public
procedure Update;
end;
implementation
procedure TStuffClass.Update;
begin
end;
end.
Creating an instance of it, and calling its Update
procedure causes the program to SIGSEGV..
What the..? It's doing absolutely nothing.
I am using the Freepascal (& Lazarus) 32 bit version.
Why does it do this?
EDIT: Here is the calling bit:
//Creating it
constructor TEngine.Create(TV: pSDL_Surface);
begin
Self.TV := TV;
Self.StuffClass.Create;
end;
function TEngine.Update: Boolean;
begin
WriteLN('Test');
SDL_PumpEvents;
Self.StuffClass.Update; //Crashes here.
Update := True;
end;