Ticket #4745: libs_libmyth_mythcontext.cpp-fix-forgotten-null-check.patch

File libs_libmyth_mythcontext.cpp-fix-forgotten-null-check.patch, 718 bytes (added by Erik Hovland <erik@…>, 13 years ago)

adds a check for non-null before dereferencing the context pointer

  • libs/libmyth/mythcontext.cpp

    Most of the time the pointer to the myth context is checked. Here is an instance
    
    From: Erik Hovland <erik@hovland.org>
    
    where it isn't.
    ---
    
     libs/libmyth/mythcontext.cpp |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/libs/libmyth/mythcontext.cpp b/libs/libmyth/mythcontext.cpp
    index 315006f..de32679 100644
    a b QString MythContext::GetSetting(const QString &key, const QString &defaultval) 
    27162716                                .arg(key));
    27172717    }
    27182718
    2719     if (!found)
     2719    if (d && !found)
    27202720        value = d->m_settings->GetSetting(key, defaultval);
    27212721
    27222722    if (!value.isNull() && d && d->useSettingsCache)