From 446f2e7c7a6929a54855721c00262bcd0e10ca36 Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Wed, 5 Sep 2012 22:40:50 +0200 Subject: [PATCH] gtk: Fix a small issue in the previous commit to IconTheme The native array has an extra NULL element, so we pass the length of the managed array, which is the real length of the array. --- gtk/IconTheme.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gtk/IconTheme.cs b/gtk/IconTheme.cs index e2d3c5888..524cfd7e2 100644 --- a/gtk/IconTheme.cs +++ b/gtk/IconTheme.cs @@ -78,7 +78,6 @@ namespace Gtk { public string[] SearchPath { get { - string[] retval; int length; IntPtr raw_ret; if (IsWindowsPlatform) @@ -97,9 +96,9 @@ namespace Gtk { native_path = GLib.Marshaller.StringArrayToNullTermPointer (value); if (IsWindowsPlatform) - gtk_icon_theme_set_search_path_utf8 (Handle, native_path, native_path.Length); + gtk_icon_theme_set_search_path_utf8 (Handle, native_path, value.Length); else - gtk_icon_theme_set_search_path (Handle, native_path, native_path.Length); + gtk_icon_theme_set_search_path (Handle, native_path, value.Length); GLib.Marshaller.Free (native_path); }