Re: GLib_CRITICAL: g_io_channel_new_file() / win32
- From: Tim Müller <zen18864 zen co uk>
- To: gtk-app-devel-list gnome org
- Subject: Re: GLib_CRITICAL: g_io_channel_new_file() / win32
- Date: Sat, 11 Sep 2004 12:02:32 +0100
On Saturday 11 September 2004 08:29, F. Kater wrote:
Tor Lillqvist:
What does the error message say?
Stupid me, I forgot to add that, sorry. Here it is:
(my_app.exe:900): GLib-CRITICAL **: file giowin32.c: line 1271
(g_io_channel_new_file): assertion `(error == NULL) || (*error == NULL)'
failed
This is because you didn't initialise the GError pointer variable to NULL
before passing its address to g_io_channel_new_file():
GError *err = NULL;
ioc = g_io_channel_new_file ("foo.txt", "r", &err);
or
ioc = g_io_channel_new_file ("foo.txt", "r", NULL);
but not:
GError *err;
ioc = g_io_channel_new_file ("foo.txt", "r", &err);
Cheers
-Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]