Skip to content
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

Fix crash when the file save dialog is cancelled #54

Merged
merged 1 commit into from
Feb 18, 2020
Merged

Fix crash when the file save dialog is cancelled #54

merged 1 commit into from
Feb 18, 2020

Conversation

robertguetzkow
Copy link
Contributor

@robertguetzkow robertguetzkow commented Feb 18, 2020

The filename is an empty string when the file save dialog is cancelled, which results in an attempt to open a non-existent file in ViewerWindow's save(), EditorWindow's export() and save(). Since the error isn't caught, viscm terminates. This patch checks if the returned string is empty and if it is, no file I/O operation is performed.

The filename is an empty string when the file save dialog is cancelled, which results in an attempt to open a non-existent file in `ViewerWindow`'s `save()`, `EditorWindow`'s `export()` and `save()`. Since the error isn't caught viscm terminates. This fix checks if the returned string is empty and if it is, no file I/O operation is performed.
@tacaswell tacaswell merged commit e9c1f53 into matplotlib:master Feb 18, 2020
@tacaswell
Copy link
Member

Thanks @robertguetzkow !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants