MailWindow: Fail silently when disposing documents
All checks were successful
Test / Run tests (push) Successful in 1m49s
All checks were successful
Test / Run tests (push) Successful in 1m49s
This commit is contained in:
@@ -615,12 +615,16 @@ namespace Elwig.Windows {
|
||||
}
|
||||
|
||||
private void DisposeDocs() {
|
||||
PrintDocument?.Dispose();
|
||||
PrintDocument = null;
|
||||
try {
|
||||
PrintDocument?.Dispose();
|
||||
PrintDocument = null;
|
||||
} catch { }
|
||||
if (EmailDocuments != null) {
|
||||
foreach (var (m, docs) in EmailDocuments) {
|
||||
foreach (var d in docs) {
|
||||
d.Dispose();
|
||||
try {
|
||||
d.Dispose();
|
||||
} catch { }
|
||||
}
|
||||
}
|
||||
EmailDocuments = null;
|
||||
|
||||
Reference in New Issue
Block a user