Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 21494)
+++ wp-includes/wp-db.php	(working copy)
@@ -563,6 +563,9 @@
 		if ( 'col_info' == $var )
 			$this->load_col_info();
 
+		if ( ! isset( $this->$var ) )
+			return null;
+
 		return $this->$var;
 	}
 
@@ -1076,7 +1079,9 @@
 		$this->last_result = array();
 		$this->col_info    = null;
 		$this->last_query  = null;
-		@mysql_free_result( $this->result );
+
+		if ( is_resource( $this->result ) )
+			mysql_free_result( $this->result );
 	}
 
 	/**
