Summary: | Krita crashes on opening a closed kra file again via Open recent | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Raghavendra kamath <raghu> |
Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | halla |
Priority: | NOR | Keywords: | drkonqi |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Raghavendra kamath
2017-08-08 13:03:23 UTC
The steps to reproduce is 1) Open krita and any previously saved file 2) do some work and close it with ctrl + w don't close krita yet 3) Open the same file via File > Open recent > filename I think that this commit fixed it: commit a9629cc52afa1a1b965c926cab7e96928e0e84d1 Author: Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com> Date: Tue Aug 1 18:21:04 2017 +0200 Add some extra checks to prevent crashes in paletteModel diff --git a/libs/ui/KisPaletteModel.cpp b/libs/ui/KisPaletteModel.cpp index fc18a79964..0c556e23fa 100644 --- a/libs/ui/KisPaletteModel.cpp +++ b/libs/ui/KisPaletteModel.cpp @@ -337,7 +337,14 @@ int KisPaletteModel::idFromIndex(const QModelIndex &index) const KoColorSetEntry KisPaletteModel::colorSetEntryFromIndex(const QModelIndex &index) const { + KoColorSetEntry blank = KoColorSetEntry; + if (!index.isValid()) { + return blank; + } QStringList entryList = qVariantValue<QStringList>(data(index, RetrieveEntryRole)); + if (entryList.isEmpty()) { + return blank; + } QString groupName = entryList.at(0); quint32 indexInGroup = entryList.at(1).toUInt(); return m_colorSet->getColorGroup(indexInGroup, groupName) Can you check? Yes this is fixed for me now. Closing the report Thank you Wolthera :) |