Fix crash when right-clicking a Part entry

Review Request #121468 - Created Dec. 12, 2014 and submitted

Information
Elvis Angelaccio
ark
master
341809
e508347...
Reviewers
kdeutils
rkcosta

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.

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.

Raphael Kubo da Costa
Elvis Angelaccio
Review request changed

Status: Closed (submitted)

Loading...