summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2014-07-07 19:10:26 +0000
committerMarc Espie <espie@cvs.openbsd.org>2014-07-07 19:10:26 +0000
commiteea815898e04349025979986a909f054fb5a5b69 (patch)
treee26b8a6fa345d6aea05999a0381dd41c092d74a3 /usr.sbin/pkg_add/OpenBSD
parentee1bf4691c95b5286747f4a5a70b2980dad553d7 (diff)
sometimes, the callback happens when the archive isn't opened...
fix it quickly, to be fixed better later.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageLocation.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm
index 16b5de15ad2..45c099b2d07 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageLocation.pm,v 1.40 2014/07/07 16:43:55 espie Exp $
+# $OpenBSD: PackageLocation.pm,v 1.41 2014/07/07 19:10:25 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -328,7 +328,9 @@ sub skip
sub set_callback
{
my ($self, $code) = @_;
- $self->{_archive}->set_callback($code);
+ if (defined $self->{_archive}) {
+ $self->{_archive}->set_callback($code);
+ }
}
package OpenBSD::PackageLocation::Installed;