[Okular-devel] Review Request: Fix for the bug-166645

Albert Astals Cid tsdgeos at terra.es
Wed Aug 22 07:02:58 UTC 2012



> On Aug. 21, 2012, 8:41 p.m., Albert Astals Cid wrote:
> > shell/shell.cpp, line 141
> > <http://git.reviewboard.kde.org/r/105965/diff/8/?file=79700#file79700line141>
> >
> >     Can you put this code inside the if (m_part) check? Otherwise it'll crash in the case that if is trying to protect us against
> 
> Jaydeep Solanki wrote:
>     I don't understand what you said in the second statement. Please explain.

Look at the diff, in the old version it does


if ( m_part )
{
do stuff
}

and now you do

if (m_part->foo())
{
do stuff
}
if ( m_part )  //old code
{
do stuff
}

The "if (m_part)" means that m_part might be null at this stage, so if it is null, your code will crash.


- Albert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105965/#review17822
-----------------------------------------------------------


On Aug. 21, 2012, 10:44 a.m., Jaydeep Solanki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105965/
> -----------------------------------------------------------
> 
> (Updated Aug. 21, 2012, 10:44 a.m.)
> 
> 
> Review request for Okular.
> 
> 
> Description
> -------
> 
> This patch is a fix for the bug-166645, as listed here (https://bugs.kde.org/show_bug.cgi?id=166645)
> 
> Opens a new instance of Okular for every other file that is opened.
> 
> 
> Diffs
> -----
> 
>   part.h d9a5cc4 
>   part.cpp 7c1ca71 
>   shell/shell.h 8430b9c 
>   shell/shell.cpp 8b99ce4 
> 
> Diff: http://git.reviewboard.kde.org/r/105965/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jaydeep Solanki
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20120822/a3ddc406/attachment.html>


More information about the Okular-devel mailing list