Index: wp-db.php
===================================================================
--- wp-db.php	(revision 4201)
+++ wp-db.php	(working copy)
@@ -213,6 +213,9 @@
 		$this->func_call = "\$db->get_row(\"$query\",$output,$y)";
 		if ( $query )
 			$this->query($query);
+		
+		if ( !isset($this->last_result[$y]) )
+			return null;
 
 		if ( $output == OBJECT ) {
 			return $this->last_result[$y] ? $this->last_result[$y] : null;
