From 320fd69923cf4a647869a89453d01acf81f479e0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 27 Dec 2010 14:32:48 +0100 Subject: Use fail_on_null. --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pidl/lib') diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 70289e1636..60352ae8d7 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -1065,7 +1065,7 @@ sub ConvertObjectFromPythonLevel($$$$$$$$) my $union_type = mapTypeName($nl->{DATA_TYPE}); $self->pidl("$union_type *$switch_ptr;"); $self->pidl("$switch_ptr = py_export_" . $nl->{DATA_TYPE} . "($mem_ctx, $switch, $py_var);"); - $self->pidl("if ($switch_ptr == NULL) { $fail }"); + $self->fail_on_null($switch_ptr, $fail); $self->assign($var_name, "$switch_ptr"); $self->deindent; $self->pidl("}"); -- cgit