Fix an occasional crasher by checking the size of the custom query result set is not zero before attempting to get an object from it. As far as I'm aware this crash only seemed to occur when executing the second out of 2 queries that both contained multiple OUTER JOINS.
Fix an occasional crasher by checking the size of the custom query result set is not zero before attempting to get an object from it. As far as I'm aware this crash only seemed to occur when executing the second out of 2 queries that both contained multiple OUTER JOINS.

git-svn-id: 6eeea455dc0e2ce42bed66071b2ee3651efe9ff5@1573 eefc5464-0a4a-0410-82e6-d75a05d1654a

svn2github/Sequel-Pro,svn2github/Sequel-Pro,havocbane/sequel-pro,svn2github/Sequel-Pro,havocbane/sequel-pro,svn2github/Sequel-Pro,havocbane/sequel-pro,havocbane/sequel-pro