New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StandaloneFileBrowserLinux.cs with NullReferenceException #45
Comments
If it returns null, it will not ever reach that second return statement. I think your problem lies somewhere else. |
NullReferenceException happens at StandaloneFileBrowserLinux.cs, line 45 and line 63, Because paths is null, |
I could not find the null error when pressing CANCEL, but I did find it when pressing X. It appears they are different events on GTK. I made a patch and will make a pull request soon. |
When using StandaloneFileBrowser in Linux OS (ubuntu), if I choose "CANCEL" or "ESC" in file browse dialog, the returned (string[])paths become null.
And will become NullReferenceException at paths.Split(...);
` public string[] OpenFilePanel(string title, string directory, ExtensionFilter[] extensions, bool multiselect) {
var paths = Marshal.PtrToStringAnsi(DialogOpenFilePanel(
title,
directory,
GetFilterFromFileExtensionList(extensions),
multiselect));
` public string[] OpenFolderPanel(string title, string directory, bool multiselect) {
var paths = Marshal.PtrToStringAnsi(DialogOpenFolderPanel(
title,
directory,
multiselect));
The text was updated successfully, but these errors were encountered: