Review Request: Crash fix: Avoid a dangling pointer when keyPressEvent changes the cursor to a different block.

Andrew Fuller mactalla.obair at gmail.com
Thu Nov 10 21:13:50 GMT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103108/
-----------------------------------------------------------

Review request for Calligra.


Description
-------

If the layout is fetched before keyPressEvent it may be deleted before we call setPreeditArea and will segfault.

This is a relatively special case that many people will never see.  But we don't want any crashes, do we?

To reproduce:
* enable CJK input in order to utilize the preedit area
* In a new document type "lorem<enter>ipsum" followed by a few pre-edit characters.  For example if using chewing you could type ji3g4
* Do *not* commit the text (don't hit <enter>)
* Select all (ctrl-A) and change the font size
* Cross your fingers you didn't lose too much of your data


Diffs
-----

  plugins/textshape/TextTool.cpp c4d64ef 

Diff: http://git.reviewboard.kde.org/r/103108/diff/diff


Testing
-------


Thanks,

Andrew Fuller

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20111110/e410e1d3/attachment.htm>


More information about the calligra-devel mailing list