Summary: | crash on loading odt | ||
---|---|---|---|
Product: | [Applications] calligrawords | Reporter: | Jos van den Oever <jos> |
Component: | general | Assignee: | Calligra Words Bugs <calligra-words-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 2.7 Pre-Alpha | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/calligra/21d4b1f97167e4974c46bd90aeaf8cda3268d97c | Version Fixed In: | |
Attachments: | Simple text file with coloured text. |
Description
Jos van den Oever
2013-04-29 07:50:27 UTC
Created attachment 79534 [details]
Simple text file with coloured text.
Git commit 21d4b1f97167e4974c46bd90aeaf8cda3268d97c by Elvis Stansvik. Committed on 27/05/2013 at 16:11. Pushed by astan into branch 'master'. Ignore default styles in styleApplied. DockerStylesComboModel::styleApplied may be called with the default paragraph style as argument. The function assumes that the source model can provide an index for the supplied style (see the calls to indexForCharacterStyle). But the source model explicitly avoids adding items for the default styles, so these calls will return an invalid index, which results in a -1 being added as a row to m_usedStyles. In the next call to styleApplied, this will result in an invalid internalId being used to try to get the corresponding style from the style manager. The invalid style pointer is then used, resulting in the crash described in the bug. This fix turns DockerStylesComboModel::styleApplied into a no-op if the supplied style is either the default character style or the default paragraph styles, since there will never be any items for these in the source model. REVIEW: 110506 M +6 -0 plugins/textshape/dialogs/DockerStylesComboModel.cpp http://commits.kde.org/calligra/21d4b1f97167e4974c46bd90aeaf8cda3268d97c |