Ticket #5147: programs_mythfrontend_programrecpriority.cpp-fix-forgotten-null-check.patch

File programs_mythfrontend_programrecpriority.cpp-fix-forgotten-null-check.patch, 1.0 KB (added by Erik Hovland <erik@…>, 12 years ago)

put lType dereference inside of null check conditional block

  • programs/mythfrontend/programrecpriority.cpp

    Making sure that list is valid before dereferencing it. Forgetting to can
    
    From: Erik Hovland <erik@hovland.org>
    
    mean a segfault for mythfrontend
    ---
    
     programs/mythfrontend/programrecpriority.cpp |   12 ++++++------
     1 files changed, 6 insertions(+), 6 deletions(-)
    
    diff --git a/programs/mythfrontend/programrecpriority.cpp b/programs/mythfrontend/programrecpriority.cpp
    index bcbb6b9..0cf2b0d 100644
    a b void ProgramRecPriority::updateList(QPainter *p) 
    14301430                else
    14311431                    pageDowner = true;
    14321432            }
    1433         }
    14341433
    1435         ltype->SetDownArrow(pageDowner);
    1436         if (inData > 0)
    1437             ltype->SetUpArrow(true);
    1438         else
    1439             ltype->SetUpArrow(false);
     1434            ltype->SetDownArrow(pageDowner);
     1435            if (inData > 0)
     1436                ltype->SetUpArrow(true);
     1437            else
     1438                ltype->SetUpArrow(false);
     1439        }
    14401440    }
    14411441
    14421442    if (programData.count() <= 0)