Skip to content

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.

3 participants