Re: [Vala] strict non-null check
- From: Luca Dionisi <luca dionisi gmail com>
- To: Luca Bruno <lethalman88 gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] strict non-null check
- Date: Tue, 3 Jan 2012 18:08:24 +0100
On Tue, Jan 3, 2012 at 5:25 PM, Luca Bruno <lethalman88 gmail com> wrote:
On Tue, Jan 3, 2012 at 4:55 PM, Luca Dionisi <luca dionisi gmail com> wrote:
When passing a non-null object to a function, valac will put this check:
g_return_if_fail (v != NULL);
So, if I pass a null value the function is not performed, a message is
printed and the rest of the application happily carries on.
How can I make the program to abort when a null is passed to a non-null
object?
You can use G_DEBUG=fatal-criticals .
It works. Thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]