Skip to content

Commit

Permalink
Catch invalid base64 when loading notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnPeel committed Jul 11, 2016
1 parent c2a32e7 commit ca60baa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Projects/Simba/simbaunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3060,10 +3060,14 @@ procedure TSimbaForm.FormCreate(Sender: TObject);
if SimbaSettings.Oops then
formWriteln('WARNING: No permissions to write to ' + SimbaSettingsFile);

NotesMemo.Lines.Text := DecompressString(Base64Decode(SimbaSettings.Notes.Content.Value));
NotesMemo.Visible := SimbaSettings.Notes.Visible.Value;
NotesSplitter.Visible := SimbaSettings.Notes.Visible.Value;
ActionNotes.Checked := SimbaSettings.Notes.Visible.Value;
try
NotesMemo.Lines.Text := DecompressString(Base64Decode(SimbaSettings.Notes.Content.Value));
NotesMemo.Visible := SimbaSettings.Notes.Visible.Value;
NotesSplitter.Visible := SimbaSettings.Notes.Visible.Value;
ActionNotes.Checked := SimbaSettings.Notes.Visible.Value;
except
formWriteln('There was an issue loading Notes.');
end;

HandleParameters;
FillThread.Start;
Expand Down

0 comments on commit ca60baa

Please sign in to comment.