Ticket #4935: libs_libmythtv_sr_dialog.cpp-make-sure-container-exists.patch

File libs_libmythtv_sr_dialog.cpp-make-sure-container-exists.patch, 590 bytes (added by Erik Hovland <erik@…>, 12 years ago)

Checks container pointer for null before dereferencing

  • libs/libmythtv/sr_dialog.cpp

    container might be null. Check before dereferencing.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     libs/libmythtv/sr_dialog.cpp |    2 ++
     1 files changed, 2 insertions(+), 0 deletions(-)
    
    diff --git a/libs/libmythtv/sr_dialog.cpp b/libs/libmythtv/sr_dialog.cpp
    index 877c5df..bdf8e9f 100644
    a b void RecOptDialog::updateBackground(void) 
    203203    QPainter tmp(&bground);
    204204
    205205    LayerSet *container = theme->GetSet("background");
     206
     207    if (container)
    206208        container->Draw(&tmp, 0, 0);
    207209
    208210    tmp.end();