$sth->{Active} may throw during destruction >.<
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Cursor.pm
index 75b1136..eee5cbb 100644 (file)
@@ -179,7 +179,7 @@ sub _check_dbh_gen {
 sub DESTROY {
   # None of the reasons this would die matter if we're in DESTROY anyways
   if (my $sth = $_[0]->sth) {
-    try { $sth->finish } if $sth->{Active};
+    try { $sth->finish } if $sth->FETCH('Active');
   }
 }