We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab39b53 commit fc408f1Copy full SHA for fc408f1
src/StructuredLogViewer/MainWindow.xaml.cs
@@ -203,16 +203,23 @@ private bool TryOpenFromClipboard()
203
204
private string GetSingleFileFromClipboard()
205
{
206
- if (Clipboard.ContainsFileDropList())
+ try
207
208
- var fileDropList = Clipboard.GetFileDropList();
209
- if (fileDropList.Count == 1)
+ if (Clipboard.ContainsFileDropList())
210
211
- return fileDropList[0];
+ var fileDropList = Clipboard.GetFileDropList();
+ if (fileDropList.Count == 1)
212
+ {
213
+ return fileDropList[0];
214
+ }
215
}
- }
216
- return Clipboard.GetText();
217
+ return Clipboard.GetText();
218
219
+ catch
220
221
+ return null;
222
223
224
225
private void DisplayWelcomeScreen(string message = "")
0 commit comments