PHP 5.3.0 compatibility changes
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index 98cec06..ecd0e70 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.php
@@ -103,11 +103,11 @@
 	function _compile_queries()
 	{
 		$dbs = array();
-		
+
 		// Let's determine which databases are currently connected to
 		foreach (get_object_vars($this->CI) as $CI_object)
 		{
-			if ( is_subclass_of(get_class($CI_object), 'CI_DB') )
+			if (is_object($CI_object) && is_subclass_of(get_class($CI_object), 'CI_DB') )
 			{
 				$dbs[] = $CI_object;
 			}