Review Request 121468: Fix crash when right-clicking a Part entry

Raphael Kubo da Costa rakuco at FreeBSD.org
Tue Dec 16 22:05:42 UTC 2014


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

Ship it!


Please change the logic to

```
if (!factory()) {
    return;
}
// rest of the code
```

instead, as you then do not need to indent the successful case. Remember to commit to Applications/14.12 and then merge into master.

- Raphael Kubo da Costa


On Dec. 12, 2014, 5:41 p.m., Elvis Angelaccio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121468/
> -----------------------------------------------------------
> 
> (Updated Dec. 12, 2014, 5:41 p.m.)
> 
> 
> Review request for KDE Utils and Raphael Kubo da Costa.
> 
> 
> Bugs: 341809
>     http://bugs.kde.org/show_bug.cgi?id=341809
> 
> 
> Repository: ark
> 
> 
> Description
> -------
> 
> My commit ed3ea7d introduced a bug that we didn't catch. When previewing an archive inside another archive, `factory()` returns a null pointer and so there is a segfault while attempting to show the context menu (after right-clicking an entry of the previewed archive).
> The bug is trivally fixable by checking the validity of the `factory()` pointer, but this way the context menu is not showed at all. I think this should be fine, since we are talking about a read only preview of the archive and thus the only enabled action within the context menu would be `Preview`.
> 
> 
> Diffs
> -----
> 
>   part/part.cpp 09fe1cbfcc7f4345fe12932055dcb041f50abb7b 
> 
> Diff: https://git.reviewboard.kde.org/r/121468/diff/
> 
> 
> Testing
> -------
> 
> Compile and test by previewing an archive inside another archive: now the crash is gone and nothing happens after right-clicking one of its entry.
> 
> 
> Thanks,
> 
> Elvis Angelaccio
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20141216/09ee9b17/attachment.html>


More information about the Kde-utils-devel mailing list