Review Request 127237: Fix crash in kmore tools on Windows

Gregor Mi codestruct at posteo.org
Mon Mar 7 21:29:48 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127237/#review93270
-----------------------------------------------------------




src/kmoretools/kmoretoolsmenufactory.cpp (lines 128 - 129)
<https://git.reviewboard.kde.org/r/127237/#comment63592>

    Thanks for the comment. However, as long as we don't know the root cause for the null pointers, I would feel better if the comment states clearly that we don't know what is happening and that it is happening on Windows only.



src/kmoretools/kmoretoolsmenufactory.cpp (lines 237 - 238)
<https://git.reviewboard.kde.org/r/127237/#comment63593>

    see my comment above



src/kmoretools/kmoretoolspresets.cpp (line 97)
<https://git.reviewboard.kde.org/r/127237/#comment63594>

    Again, this should not happen here, so please add a comment that this is a fix for Windows.



src/kmoretools/kmoretoolspresets.cpp (lines 165 - 167)
<https://git.reviewboard.kde.org/r/127237/#comment63595>

    As above: as long as we don't know the reason for the nullpointers I would be happier if there was a comment.
    
    That said I don't know what the KDE policy is when dealing with this kind of problem. Just adding null checks seems to make the code more complicated to analyse later. You are a long-term committer, so your words have a high weight. On the other hand I would be interested in a second opinion.


- Gregor Mi


On March 7, 2016, 8:38 p.m., Kåre Särs wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127237/
> -----------------------------------------------------------
> 
> (Updated March 7, 2016, 8:38 p.m.)
> 
> 
> Review request for KDE Frameworks and Gregor Mi.
> 
> 
> Repository: knewstuff
> 
> 
> Description
> -------
> 
> On Windows we sometimes get null-pointers in stead of pointers to KMoreToolsService. This patch adds checks for null-pointers in those places that made Kate crash in the project plugin and adds a nullptr check before adding them to the list.
> 
> 
> Diffs
> -----
> 
>   src/kmoretools/kmoretoolsmenufactory.cpp 30f4d02 
>   src/kmoretools/kmoretoolspresets.cpp 2405321 
> 
> Diff: https://git.reviewboard.kde.org/r/127237/diff/
> 
> 
> Testing
> -------
> 
> Compiled and run on windows. No crashes in Kate when right-clicking files in the project plugin.
> 
> 
> Thanks,
> 
> Kåre Särs
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160307/260f49de/attachment.html>


More information about the Kde-frameworks-devel mailing list