Ticket #5517: libs_libmythtv-null-returns.patch

File libs_libmythtv-null-returns.patch, 919 bytes (added by Erik Hovland <erik@…>, 12 years ago)

checks subtitleOSD for null

  • mythtv/libs/libmythtv/NuppelVideoPlayer.cpp

    If a function can return a null pointer then whatever
    
    From: Erik Hovland <erik@hovland.org>
    
    calls it has to check the pointer's validity.
    ---
    
     mythtv/libs/libmythtv/NuppelVideoPlayer.cpp |    7 +++++--
     1 files changed, 5 insertions(+), 2 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp b/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
    index 33f053e..e2223f4 100644
    a b void NuppelVideoPlayer::DisplayDVDButton(void) 
    71077107        image->Load(hl_image);
    71087108        image->SetDontRoundPosition(true);
    71097109
    7110         subtitleOSD->AddType(image);
    7111         osd->SetVisible(subtitleOSD, 0);
     7110        if (subtitleOSD)
     7111        {
     7112            subtitleOSD->AddType(image);
     7113            osd->SetVisible(subtitleOSD, 0);
     7114        }
    71127115
    71137116        hidedvdbutton = false;
    71147117        subtitleLock.unlock();