mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
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:
parent
9c54fd5ae7
commit
446f2e7c7a
@ -78,7 +78,6 @@ namespace Gtk {
|
|||||||
|
|
||||||
public string[] SearchPath {
|
public string[] SearchPath {
|
||||||
get {
|
get {
|
||||||
string[] retval;
|
|
||||||
int length;
|
int length;
|
||||||
IntPtr raw_ret;
|
IntPtr raw_ret;
|
||||||
if (IsWindowsPlatform)
|
if (IsWindowsPlatform)
|
||||||
@ -97,9 +96,9 @@ namespace Gtk {
|
|||||||
native_path = GLib.Marshaller.StringArrayToNullTermPointer (value);
|
native_path = GLib.Marshaller.StringArrayToNullTermPointer (value);
|
||||||
|
|
||||||
if (IsWindowsPlatform)
|
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
|
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);
|
GLib.Marshaller.Free (native_path);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user