Review Request 121600: sublime: prevent accidentally adding nullptrs to ContainerPrivate::viewForWidget

Kevin Funk kfunk at kde.org
Fri Dec 19 20:13:52 UTC 2014


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

Ship it!



sublime/container.cpp
<https://git.reviewboard.kde.org/r/121600/#comment50430>

    Use `QMap::value`.


- Kevin Funk


On Dec. 19, 2014, 7:11 p.m., Nicolai Hähnle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121600/
> -----------------------------------------------------------
> 
> (Updated Dec. 19, 2014, 7:11 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Bugs: 342037
>     http://bugs.kde.org/show_bug.cgi?id=342037
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> The likely culprit here is using operator[] to access a map, which implicitly
> creates an entry containing a null view. I have audited all other accesses of
> viewForWidget with operator[] to verify that they happen in a context where
> the entry is non-null (either because the access is used to assign a non-null
> view pointer or because the access is guaranteed to crash or abort immediately
> if it would create an incorrect nullptr entry).
> 
> BUG: 342037
> 
> 
> Diffs
> -----
> 
>   sublime/container.cpp aac4b11679fcb7a04e8aee7f831c95b0d1e4192c 
> 
> Diff: https://git.reviewboard.kde.org/r/121600/diff/
> 
> 
> Testing
> -------
> 
> manual testing
> 
> 
> Thanks,
> 
> Nicolai Hähnle
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20141219/cc210e69/attachment.html>


More information about the KDevelop-devel mailing list