Ticket #9875: 0006-GridLayout.cpp-use-delete-instead-of-delete.patch

File 0006-GridLayout.cpp-use-delete-instead-of-delete.patch, 789 bytes (added by mt, 11 years ago)

Patch

  • src/kits/interface/GridLayout.cpp

    From 815e7108e680405fa7926f4d5fad7239413225d2 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Mon, 15 Jul 2013 20:28:16 +0900
    Subject: [PATCH] GridLayout.cpp: use delete[] instead of delete
    
    ---
     src/kits/interface/GridLayout.cpp |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/kits/interface/GridLayout.cpp b/src/kits/interface/GridLayout.cpp
    index 03577d6..2bd1aa7 100644
    a b BGridLayout::_ResizeGrid(int32 columnCount, int32 rowCount)  
    787787
    788788    // delete the old, respectively on error the partially created grid
    789789    for (int32 i = 0; i < columnCount; i++)
    790         delete grid[i];
     790        delete[] grid[i];
    791791    delete[] grid;
    792792
    793793    return success;