[pan] body-pane.cc: fix call to delete



commit ed3791fd2ed9ca97c515cc0cc335d995428eb016
Author: Dominique Dumont <dod debian org>
Date:   Sat Apr 9 16:59:12 2022 +0200

    body-pane.cc: fix call to delete
    
    Fix #83
    
    See https://www.programiz.com/cpp-programming/memory-management for
    info on new and delete applied to arrays.

 pan/gui/body-pane.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pan/gui/body-pane.cc b/pan/gui/body-pane.cc
index 43f0c43..4f03a87 100644
--- a/pan/gui/body-pane.cc
+++ b/pan/gui/body-pane.cc
@@ -196,7 +196,7 @@ namespace
   GdkCursor * cursor_current(0);
 
   void free_cursors (void) {
-    delete cursors;
+    delete[] cursors;
   }
 
   void create_cursors() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]