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.
This commit is contained in:
Bertrand Lorentz 2012-09-05 22:40:50 +02:00
parent 9c54fd5ae7
commit 446f2e7c7a

View File

@ -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);
}