diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-08-02 17:15:16 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-08-02 17:15:16 +0100 |
commit | 3db9bd59e87ae9ac105500e0fda5824821365026 (patch) | |
tree | 709d43b7bb8b6ed6557f5c2f3f4766faab7c4f03 /src/gui | |
parent | 132c38ae7d29a5e8d08916fb16eaf25d50cf4c70 (diff) | |
download | fpGUI-3db9bd59e87ae9ac105500e0fda5824821365026.tar.xz |
Prevents a possible AV when the Memo reference might already have been set to nil.
This could happen in some cases when the TfpgMemo is destroyed while contain text.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_memo.pas | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/fpg_memo.pas b/src/gui/fpg_memo.pas index 05b5a64a..60bade4d 100644 --- a/src/gui/fpg_memo.pas +++ b/src/gui/fpg_memo.pas @@ -223,9 +223,11 @@ end; procedure TfpgMemoStrings.Clear; begin - Memo.BeginUpdate; + if Assigned(Memo) then + Memo.BeginUpdate; inherited Clear; - Memo.EndUpdate; + if Assigned(Memo) then + Memo.EndUpdate; end; |