{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/328","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/328/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/328/events","html_url":"https://github.com/chrsmith/bwapi/issues/328","id":58521429,"number":328,"title":"Player::isEnemy crashes on NULL","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Object-Multi","name":"Object-Multi","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Priority-Critical","name":"Priority-Critical","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Type-Defect","name":"Type-Defect","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Usability","name":"Usability","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-22T21:45:57Z","updated_at":"2015-02-22T21:45:57Z","closed_at":null,"body":"```\nWhat steps will reproduce the problem?\n1. Let p be a pointer to an instance of Player\n2. call p->isEnemy(NULL)\n3. CRASH\n\nWhat is the expected output? What do you see instead?\nPossible behaviour: Return False, throwing an exception, printing an error \nmessage\nInstead it CRASHES\n\nWhat version of the product are you using? On what operating system?\nRevision 3265, XPSP3\n\nPlease provide any additional information below.\nI won't be surprised if a lot of other methods have the same problem.\n```\n\n-----\nOriginal issue reported on code.google.com by `erez27` on 5 Dec 2010 at 9:06"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75463892","html_url":"https://github.com/chrsmith/bwapi/issues/328#issuecomment-75463892","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/328","id":75463892,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-22T21:45:57Z","updated_at":"2015-02-22T21:45:57Z","body":"```\nHere's the code I used to cause it, inside the example client:\n\nvoid showPlayers()\n{\n  std::set<Player*> players=Broodwar->getPlayers();\n  for(std::set<Player*>::iterator i=players.begin();i!=players.end();i++)\n  {\n    if ((*i)->isEnemy(NULL))\n\t{\n\t\treturn;\n\t}\n    Broodwar->printf(\"Player [%d]: %s is in force: %s\",(*i)->getID(),(*i)->getName().c_str(), (*i)->getForce()->getName().c_str());\n  }\n}\n```\n\n-----\nOriginal comment by `erez27` on 5 Dec 2010 at 4:16"}}