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

Extra check when opening pup file #5321

Merged
merged 1 commit into from
Nov 10, 2018
Merged

Conversation

RipleyTom
Copy link
Contributor

Adds an extra check to avoid "fs::file is null" exception in the event that the pup file couldn't be opened.

if (!pup_f)
{
LOG_ERROR(GENERAL, "Error opening PUP file %s", path);
QMessageBox::critical(this, tr("Failure!"), tr("Firmware file selected couldn't be opened."));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk if my english got worse but that sounds weird

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds better to me

Suggested change
QMessageBox::critical(this, tr("Failure!"), tr("Firmware file selected couldn't be opened."));
QMessageBox::critical(this, tr("Failure!"), tr("The selected Firmware file couldn't be opened."));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why firmware needs capitalization, but this looks 100.

Suggested change
QMessageBox::critical(this, tr("Failure!"), tr("Firmware file selected couldn't be opened."));
QMessageBox::critical(this, tr("Failure!"), tr("The selected firmware file couldn't be opened."));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

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

Successfully merging this pull request may close these issues.

None yet

5 participants