RE: [ID 20001013.009] DB_File issues warning when setting element to undef
[p5sagit/p5-mst-13.2.git] / ext / DB_File / typemap
index 41a24f4..b244e53 100644 (file)
@@ -29,8 +29,10 @@ T_dbtkeydatum
 T_dbtdatum
        ckFilter($arg, filter_store_value, \"filter_store_value\");
        DBT_clear($var) ;
-       $var.data = SvPV($arg, PL_na);
-       $var.size = (int)PL_na;
+       if (SvOK($arg)) {
+           $var.data = SvPV($arg, PL_na);
+           $var.size = (int)PL_na;
+       }
 
 
 OUTPUT