summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm2
1 files changed, 1 insertions, 1 deletions
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("}");