Fix crash on koko startup.

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


  • 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

R659 Koko Image Gallery
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
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.