Make sure we don't crash if the slice is canceled and there is an error disposing it.
issue: MatterHackers/MCCentral#5929 InvalidOperationException: No process is associated with this object.
This commit is contained in:
parent
6ef6503b94
commit
f5015d1cd6
1 changed files with 10 additions and 2 deletions
|
|
@ -452,8 +452,16 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
slicerProcess?.Kill();
|
||||
slicerProcess?.Dispose();
|
||||
// If for some reason we cannot kill the slicing process do not exit
|
||||
try
|
||||
{
|
||||
slicerProcess?.Kill();
|
||||
slicerProcess?.Dispose();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
forcedExit = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue