Ticket #12563: 0001-PlayListWindow-Add-missing-NULL-check.patch

File 0001-PlayListWindow-Add-missing-NULL-check.patch, 834 bytes (added by Barrett, 5 years ago)
  • src/apps/mediaplayer/playlist/PlaylistWindow.cpp

    From c3110d58169616ef24c40e1b72eb90d9d2173fb1 Mon Sep 17 00:00:00 2001
    From: Dario Casalinuovo <b.vitruvio@gmail.com>
    Date: Thu, 7 Jan 2016 02:08:16 +0100
    Subject: [PATCH] PlayListWindow: Add missing NULL check
    
    ---
     src/apps/mediaplayer/playlist/PlaylistWindow.cpp | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/src/apps/mediaplayer/playlist/PlaylistWindow.cpp b/src/apps/mediaplayer/playlist/PlaylistWindow.cpp
    index fbea517..c99e971 100644
    a b void  
    559559PlaylistWindow::DurationListener::_HandleItemRemoved(int32 index)
    560560{
    561561    bigtime_t* deleted = fKnown.RemoveItemAt(index);
     562    if (deleted == NULL)
     563        return;
     564
    562565    fTotalDuration -= *deleted;
    563566    fParent._UpdateTotalDuration(fTotalDuration);
    564567