Re: g_error_free() warning on null pointer

Christian Hergert wrote:
Try g_clear_error(&error) instead of g_error_free(error) to get the
effect you want.

I had discovered this workaround.  :-)  However, I think it would be
really nice if this (very trivial) change were made in glib. For
example, with Pidgin we'd either have to replace every g_error_free() in
~300,000 lines of code (might cause unexpected breakage, people might be
irked) or just keep putting up with the warnings.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]