changeset 123:93492b9cae31

Fix: two missed g_malloc
author Frank Benoit <benoit@tionex.de>
date Sun, 20 Jan 2008 22:21:53 +0100
parents 45921f44a4b2
children 11b0a1324732
files dwt/widgets/Table.d dwt/widgets/TableItem.d
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/widgets/Table.d	Sun Jan 20 22:07:27 2008 +0100
+++ b/dwt/widgets/Table.d	Sun Jan 20 22:21:53 2008 +0100
@@ -738,7 +738,7 @@
         System.arraycopy (items, 0, newItems, 0, items.length);
         items = newItems;
     }
-    item.handle = cast(GtkWidget*) new GtkTreeIter;
+    item.handle = cast(GtkWidget*) OS.g_malloc( GtkTreeIter.sizeof );
     if (item.handle is null) error (DWT.ERROR_NO_HANDLES);
     /*
     * Feature in GTK.  It is much faster to append to a list store
--- a/dwt/widgets/TableItem.d	Sun Jan 20 22:07:27 2008 +0100
+++ b/dwt/widgets/TableItem.d	Sun Jan 20 22:21:53 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -124,8 +124,8 @@
     if (create) {
         parent.createItem (this, index);
     } else {
-        GtkTreeIter handle;
-        OS.gtk_tree_model_iter_nth_child (parent.modelHandle, &handle, null, index);
+        handle = cast(GtkWidget*)OS.g_malloc (GtkTreeIter.sizeof);
+        OS.gtk_tree_model_iter_nth_child (parent.modelHandle, handle, null, index);
     }
 }