diff --git a/ChangeLog b/ChangeLog index 3f61d8fc2..2cec81982 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-06-09 Lluis Sanchez + + * glib/Marshaller.cs: Added null check in FilenamePtrToString. + 2005-06-08 Mike Kestner * generator/SimpleBase.cs : off-by-one in namespace join. diff --git a/glib/Marshaller.cs b/glib/Marshaller.cs index c19af5d5e..d7b8615d5 100644 --- a/glib/Marshaller.cs +++ b/glib/Marshaller.cs @@ -42,6 +42,8 @@ namespace GLib { public static string FilenamePtrToString (IntPtr ptr) { + if (ptr == IntPtr.Zero) return null; + IntPtr dummy, error; IntPtr utf8 = g_filename_to_utf8 (ptr, -1, IntPtr.Zero, out dummy, out error); if (error != IntPtr.Zero)