Bug 336419 - Adding Antonyms in Editors crashes Parley
Summary: Adding Antonyms in Editors crashes Parley
Status: RESOLVED FIXED
Alias: None
Product: parley
Classification: Applications
Component: editor (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: parley bug tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-19 08:04 UTC by Andreas
Modified: 2014-07-06 17:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
example (18.09 KB, application/x-kvtml)
2014-06-19 09:45 UTC, Andreas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2014-06-19 08:04:09 UTC
Parley ->
Select Collection ->
Editor -> 
View -> antonyms ->
Select 2 words ->  
word1 and word2 are Antonyms ->
Crash

Reproducible: Always




git version master is cb35d2fe1b
Comment 1 Andreas 2014-06-19 09:45:53 UTC
Created attachment 87277 [details]
example
Comment 2 Andreas 2014-07-06 17:27:11 UTC
Git commit 95a445a1f6ee62708f87588d6594dffb953117a9 by Andreas Xavier.
Committed on 06/07/2014 at 17:24.
Pushed by axavier into branch 'master'.

Fix null pointer reference in SynonymWidget::togglePair() by initializing pointer

In both cases (antonyms and falseFriends) the synonymWidget::togglePair() was referencing an uninitialized pointer m_doc to call setModified() on the  KEduVocDocument.  The quick fix was to store pointers to the antonym and falseFriend widgets and initialize m_doc.  A better long term fix would be to have the kedevocdoc manage its own state and determine when it is dirty on its own.
Related: bug 336422

REVIEW: 119107

M  +8    -6    src/editor/editor.cpp
M  +2    -1    src/editor/editor.h

http://commits.kde.org/parley/95a445a1f6ee62708f87588d6594dffb953117a9