Ticket #5091: libs_libmythfreemheg_Link.cpp-check-for-null.patch

File libs_libmythfreemheg_Link.cpp-check-for-null.patch, 625 bytes (added by Erik Hovland <erik@…>, 12 years ago)

check pointer before passing it to function that dereferences it

  • libs/libmythfreemheg/Link.cpp

    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     libs/libmythfreemheg/Link.cpp |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/libs/libmythfreemheg/Link.cpp b/libs/libmythfreemheg/Link.cpp
    index daab860..30d0878 100644
    a b void MHLink::Initialise(MHParseNode *p, MHEngine *engine) 
    7373    }
    7474
    7575    MHParseNode *pLinkEffect = p->GetNamedArg(C_LINK_EFFECT);
    76     m_LinkEffect.Initialise(pLinkEffect, engine);
     76    if (pLinkEffect) m_LinkEffect.Initialise(pLinkEffect, engine);
    7777}
    7878
    7979static const char *rchEventType[] =