Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Ctrl+H to Share will cause a crash if the document is empty #31

Closed
prayaas-a opened this issue Aug 18, 2019 · 3 comments
Closed

Ctrl+H to Share will cause a crash if the document is empty #31

prayaas-a opened this issue Aug 18, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@prayaas-a
Copy link
Contributor

Basically the title. There isn't a nullcheck where there should be one. It's a quick fix that I've been looking at. If you assign this to me, I can take care of it and create a pull request. :)

@prayaas-a
Copy link
Contributor Author

prayaas-a commented Aug 18, 2019

Commit a2fbd1c adds a nullcheck in GetShareStorageFiles() and assigns an empty string to Data.Text if it's null. This mimics the behavior of a document that once contained text that was now deleted - the app lets them share the empty "edited" document. Likewise, with this change, it'll allow users to share a blank document right off the bat for whatever reason they would want to. It's less intrusive than a popup telling them they can't do that or a silent failure that might make the shortcut trigger seem inconsistent.

@prayaas-a
Copy link
Contributor Author

prayaas-a commented Aug 18, 2019

This is a pretty "safe" fix in that it shouldn't affect any other functionality or cause regression issues.

Note for the future: If you keep this behavior, you might wanna make sure Data and Data.Text are always initialized on launch and not null. It may help resolve a myriad other bugs similar to this one that we haven't discovered yet.

@ikarago ikarago added the bug Something isn't working label Aug 18, 2019
@ikarago
Copy link
Owner

ikarago commented Aug 18, 2019

Awesome UX thinking with this fix! 😊 I've merged your fix into the master branch in commit
48e8794.

I'll look into your note for the future, as I'm getting a ton of XAML Initialization Crash reports in the Dev Center from which I haven't been able to pinpoint it's exact cause yet. I'll make a separate issue for the initialization issues to keep track of the status of that problem. ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants