Ticket #13137: 0041-TabDecorator.cpp-fix-dereference-of-null-pointer.patch

File 0041-TabDecorator.cpp-fix-dereference-of-null-pointer.patch, 903 bytes (added by mt, 3 years ago)
  • src/servers/app/decorator/TabDecorator.cpp

    From 4a38e3fbd75c026f9618fcd106f0ec1d238fddc6 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Fri, 30 Dec 2016 12:02:38 +0900
    Subject: [PATCH 41/43] TabDecorator.cpp: fix dereference of null pointer
    
    ---
     src/servers/app/decorator/TabDecorator.cpp | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/src/servers/app/decorator/TabDecorator.cpp b/src/servers/app/decorator/TabDecorator.cpp
    index a5953f2..fe64fc9 100644
    a b TabDecorator::_DistributeTabSize(float delta)  
    465465    }
    466466
    467467    // done
    468     previousTab->tabRect.right = floorf(fFrame.right + fBorderWidth);
     468    if (previousTab != NULL)
     469        previousTab->tabRect.right = floorf(fFrame.right + fBorderWidth);
    469470
    470471    for (int32 i = 0; i < tabCount; i++) {
    471472        Decorator::Tab* tab = fTabList.ItemAt(i);