Fixed a NPE while disposing the StepLabelContainer

This commit is contained in:
Robin 2016-05-24 13:33:24 +02:00
parent 44fba68477
commit 7c3812c529

View file

@ -148,7 +148,10 @@ namespace Greenshot.Drawing {
if (!disposing) {
return;
}
((Surface)Parent).RemoveStepLabel(this);
if (Parent != null)
{
((Surface)Parent).RemoveStepLabel(this);
}
if (_stringFormat != null) {
_stringFormat.Dispose();
_stringFormat = null;