Fix crash on koko startup.

Authored by bdhruve on Oct 25 2017, 12:26 PM.

Description

Fix crash on koko startup.

Summary:

  • Q_ASSERT(QUrl(url).isLocalFile()) setUrl function is meant to also get empty url, which made this assert fail, so move the Q_ASSERT after we set url to Pictures location in case of empty url.
  • Q_ASSERT(locations.size() > 1) Fix the logic bug, which made it crash on 1 location getting returned by QStandardPaths, it is supposed to check for 1 or more, not more then 1.

Test Plan: No longer crashes at startup.

Reviewers: Koko, mart, atulsharma

Reviewed By: Koko, atulsharma

Differential Revision: https://phabricator.kde.org/D8472

Details

Committed
bdhruveOct 26 2017, 9:23 AM
Reviewer
Koko
Differential Revision
D8472: Fix crash on koko startup.
Parents
R659:7a2c6e4bf36b: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown