BUG-1716: As first UpdateTextBoxFormat was called, and than the font was disposed, we tried to draw something with a disposed font. [skip ci]

This commit is contained in:
RKrom 2014-12-08 09:03:55 +01:00
parent 0c02475feb
commit 4e45ca651e

View file

@ -173,15 +173,15 @@ namespace Greenshot.Drawing {
void TextContainer_FieldChanged(object sender, FieldChangedEventArgs e) {
if (_textBox.Visible) {
UpdateTextBoxFormat();
_textBox.Invalidate();
} else {
UpdateFormat();
//Invalidate();
}
_font.Dispose();
_font = null;
fontInvalidated = true;
UpdateTextBoxFormat();
if (_textBox.Visible) {
_textBox.Invalidate();
}
}
public override void OnDoubleClick() {