Fixed a bug when either the XPS or PDF is not supported
This commit is contained in:
Родитель
51eda31fb7
Коммит
71498535d5
|
@ -63,7 +63,10 @@ namespace SkiaSharp
|
||||||
|
|
||||||
var stream = SKFileWStream.OpenStream (path);
|
var stream = SKFileWStream.OpenStream (path);
|
||||||
var doc = CreateXps (stream, dpi);
|
var doc = CreateXps (stream, dpi);
|
||||||
doc.SetDisposeChild (stream);
|
if (doc != null)
|
||||||
|
doc.SetDisposeChild (stream);
|
||||||
|
else
|
||||||
|
stream.Dispose();
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +88,10 @@ namespace SkiaSharp
|
||||||
|
|
||||||
var stream = SKFileWStream.OpenStream (path);
|
var stream = SKFileWStream.OpenStream (path);
|
||||||
var doc = CreatePdf (stream, dpi);
|
var doc = CreatePdf (stream, dpi);
|
||||||
doc.SetDisposeChild (stream);
|
if (doc != null)
|
||||||
|
doc.SetDisposeChild (stream);
|
||||||
|
else
|
||||||
|
stream.Dispose();
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче