Fix crash on koko startup.
ClosedPublic

Authored by bdhruve on Oct 25 2017, 1:18 PM.

Details

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.

Diff Detail

Repository
R659 Koko Image Gallery
Branch
fix-crash
Lint
No Linters Available
Unit
No Unit Test Coverage
bdhruve created this revision.Oct 25 2017, 1:18 PM
atulsharma accepted this revision.Oct 25 2017, 7:05 PM
This revision is now accepted and ready to land.Oct 25 2017, 7:05 PM
This revision was automatically updated to reflect the committed changes.