Skip to content

Commit c6d2417

Browse files
committed
fixed issue with the empty file path for the default viewer handler
1 parent 7ac95b8 commit c6d2417

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Ghostscript.NET/Viewer/GhostscriptViewer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ private void Open()
328328
{
329329
string extension = Path.GetExtension(_filePath).ToLower();
330330

331-
if (string.IsNullOrWhiteSpace(extension))
331+
if (!string.IsNullOrWhiteSpace(_filePath) && string.IsNullOrWhiteSpace(extension))
332332
{
333333
using (FileStream srm = new FileStream(_filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
334334
{

0 commit comments

Comments
 (0)