[perl-Glib-Object-Introspection] Handle undef when flattening array	refs
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [perl-Glib-Object-Introspection] Handle undef when flattening array	refs
- Date: Mon,  3 Oct 2011 15:48:00 +0000 (UTC)
commit bd342853e5c7804bd44fc1a9c9d3bd02128b6234
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date:   Mon Oct 3 17:47:25 2011 +0200
    Handle undef when flattening array refs
 lib/Glib/Object/Introspection.pm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/lib/Glib/Object/Introspection.pm b/lib/Glib/Object/Introspection.pm
index 416e65c..91786cc 100644
--- a/lib/Glib/Object/Introspection.pm
+++ b/lib/Glib/Object/Introspection.pm
@@ -36,6 +36,7 @@ sub _create_invoker_sub {
     return sub {
       shift if $shift_package_name;
       my $ref = __PACKAGE__->invoke($basename, $namespace, $name, @_);
+      return if not defined $ref;
       return wantarray ? @$ref : $ref->[$#$ref];
     };
   } elsif ($handle_sentinel_boolean) {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]