[mythtv] [mythtv-commits] mythtv commit: r9927 by danielk

Martin Ebourne lists at ebourne.me.uk
Sat May 13 23:38:17 UTC 2006


On Sat, 13 May 2006 15:45:18 +0000, mythtv wrote:
>       Author: danielk
>         Date: 2006-05-13 15:45:17 +0000 (Sat, 13 May 2006)
> New Revision: 9927
>    Changeset: http://cvs.mythtv.org/trac/changeset/9927
> 
> Modified:
> 
>    branches/release-0-19-fixes/mythtv/libs/libmythtv/osdtypes.cpp
> 
> Log:
> 
> Fixes #1807. Crash on uninitialized OSD cache pointer in 0.19-fixes.
> 
> I was able to reproduce this (through a slightly more circuitus route).
> It looks like this was do to a lost change in the backport, but I also
> noticed that this depends on "delete NULL;" being safe. I added a null
> check before the delete which I'll port back to SVN head.

>From the C++ standard [expr.delete], while it is talking about both object
and array delete:

    In either alternative, if the value of the operand of delete is the
    null pointer the operation has no effect.

So delete NULL is always safe, anything else would be a serious bug in the
compiler.

Cheers,

Martin.



More information about the mythtv-dev mailing list