{"action":"closed","number":303,"pull_request":{"url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/303","id":43101614,"html_url":"https://github.com/scp-fs2open/fs2open.github.com/pull/303","diff_url":"https://github.com/scp-fs2open/fs2open.github.com/pull/303.diff","patch_url":"https://github.com/scp-fs2open/fs2open.github.com/pull/303.patch","issue_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/303","number":303,"state":"closed","locked":false,"title":"Add null pointer checks throughout lua.cpp.","user":{"login":"MageKing17","id":2095329,"avatar_url":"https://avatars.githubusercontent.com/u/2095329?v=3","gravatar_id":"","url":"https://api.github.com/users/MageKing17","html_url":"https://github.com/MageKing17","followers_url":"https://api.github.com/users/MageKing17/followers","following_url":"https://api.github.com/users/MageKing17/following{/other_user}","gists_url":"https://api.github.com/users/MageKing17/gists{/gist_id}","starred_url":"https://api.github.com/users/MageKing17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MageKing17/subscriptions","organizations_url":"https://api.github.com/users/MageKing17/orgs","repos_url":"https://api.github.com/users/MageKing17/repos","events_url":"https://api.github.com/users/MageKing17/events{/privacy}","received_events_url":"https://api.github.com/users/MageKing17/received_events","type":"User","site_admin":false},"body":"Previously, the `this != NULL` checks in the `isValid()` methods were covering most of these cases, but they were removed as part of PR #274 because clang was generating warnings because calling a method on a null pointer is undefined behavior (so the condition *should* be tautological). This performs the checks outside of `isValid()`, which should avoid (at least this variety of) undefined behavior while fixing the crashes that dereferencing null pointers was causing.","created_at":"2015-08-22T10:41:35Z","updated_at":"2015-08-22T11:06:23Z","closed_at":"2015-08-22T11:06:23Z","merged_at":"2015-08-22T11:06:23Z","merge_commit_sha":"6a1b6fefc099b072446808d688eacf185c765cfe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/303/commits","review_comments_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/303/comments","review_comment_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/303/comments","statuses_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/statuses/cd3b543e56f188ee10c12df7a5dc8d977a70a340","head":{"label":"MageKing17:bugfix/lua-null-pointer-checks","ref":"bugfix/lua-null-pointer-checks","sha":"cd3b543e56f188ee10c12df7a5dc8d977a70a340","user":{"login":"MageKing17","id":2095329,"avatar_url":"https://avatars.githubusercontent.com/u/2095329?v=3","gravatar_id":"","url":"https://api.github.com/users/MageKing17","html_url":"https://github.com/MageKing17","followers_url":"https://api.github.com/users/MageKing17/followers","following_url":"https://api.github.com/users/MageKing17/following{/other_user}","gists_url":"https://api.github.com/users/MageKing17/gists{/gist_id}","starred_url":"https://api.github.com/users/MageKing17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MageKing17/subscriptions","organizations_url":"https://api.github.com/users/MageKing17/orgs","repos_url":"https://api.github.com/users/MageKing17/repos","events_url":"https://api.github.com/users/MageKing17/events{/privacy}","received_events_url":"https://api.github.com/users/MageKing17/received_events","type":"User","site_admin":false},"repo":{"id":34633985,"name":"fs2open.github.com","full_name":"MageKing17/fs2open.github.com","owner":{"login":"MageKing17","id":2095329,"avatar_url":"https://avatars.githubusercontent.com/u/2095329?v=3","gravatar_id":"","url":"https://api.github.com/users/MageKing17","html_url":"https://github.com/MageKing17","followers_url":"https://api.github.com/users/MageKing17/followers","following_url":"https://api.github.com/users/MageKing17/following{/other_user}","gists_url":"https://api.github.com/users/MageKing17/gists{/gist_id}","starred_url":"https://api.github.com/users/MageKing17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MageKing17/subscriptions","organizations_url":"https://api.github.com/users/MageKing17/orgs","repos_url":"https://api.github.com/users/MageKing17/repos","events_url":"https://api.github.com/users/MageKing17/events{/privacy}","received_events_url":"https://api.github.com/users/MageKing17/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MageKing17/fs2open.github.com","description":"Origin Repository for SCP FreeSpace 2 Open","fork":true,"url":"https://api.github.com/repos/MageKing17/fs2open.github.com","forks_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/forks","keys_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/teams","hooks_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/hooks","issue_events_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/issues/events{/number}","events_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/events","assignees_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/assignees{/user}","branches_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/branches{/branch}","tags_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/tags","blobs_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/statuses/{sha}","languages_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/languages","stargazers_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/stargazers","contributors_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/contributors","subscribers_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/subscribers","subscription_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/subscription","commits_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/contents/{+path}","compare_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/merges","archive_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/downloads","issues_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/issues{/number}","pulls_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/pulls{/number}","milestones_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/milestones{/number}","notifications_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/labels{/name}","releases_url":"https://api.github.com/repos/MageKing17/fs2open.github.com/releases{/id}","created_at":"2015-04-26T22:18:19Z","updated_at":"2015-05-08T20:55:08Z","pushed_at":"2015-08-22T10:41:02Z","git_url":"git://github.com/MageKing17/fs2open.github.com.git","ssh_url":"git@github.com:MageKing17/fs2open.github.com.git","clone_url":"https://github.com/MageKing17/fs2open.github.com.git","svn_url":"https://github.com/MageKing17/fs2open.github.com","homepage":null,"size":101792,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scp-fs2open:master","ref":"master","sha":"0061718de4cb2fcabd32c683559835516f68415c","user":{"login":"scp-fs2open","id":3302806,"avatar_url":"https://avatars.githubusercontent.com/u/3302806?v=3","gravatar_id":"","url":"https://api.github.com/users/scp-fs2open","html_url":"https://github.com/scp-fs2open","followers_url":"https://api.github.com/users/scp-fs2open/followers","following_url":"https://api.github.com/users/scp-fs2open/following{/other_user}","gists_url":"https://api.github.com/users/scp-fs2open/gists{/gist_id}","starred_url":"https://api.github.com/users/scp-fs2open/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scp-fs2open/subscriptions","organizations_url":"https://api.github.com/users/scp-fs2open/orgs","repos_url":"https://api.github.com/users/scp-fs2open/repos","events_url":"https://api.github.com/users/scp-fs2open/events{/privacy}","received_events_url":"https://api.github.com/users/scp-fs2open/received_events","type":"Organization","site_admin":false},"repo":{"id":7700081,"name":"fs2open.github.com","full_name":"scp-fs2open/fs2open.github.com","owner":{"login":"scp-fs2open","id":3302806,"avatar_url":"https://avatars.githubusercontent.com/u/3302806?v=3","gravatar_id":"","url":"https://api.github.com/users/scp-fs2open","html_url":"https://github.com/scp-fs2open","followers_url":"https://api.github.com/users/scp-fs2open/followers","following_url":"https://api.github.com/users/scp-fs2open/following{/other_user}","gists_url":"https://api.github.com/users/scp-fs2open/gists{/gist_id}","starred_url":"https://api.github.com/users/scp-fs2open/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scp-fs2open/subscriptions","organizations_url":"https://api.github.com/users/scp-fs2open/orgs","repos_url":"https://api.github.com/users/scp-fs2open/repos","events_url":"https://api.github.com/users/scp-fs2open/events{/privacy}","received_events_url":"https://api.github.com/users/scp-fs2open/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scp-fs2open/fs2open.github.com","description":"Origin Repository for SCP FreeSpace 2 Open","fork":false,"url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com","forks_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/forks","keys_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/teams","hooks_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/hooks","issue_events_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/events{/number}","events_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/events","assignees_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/assignees{/user}","branches_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/branches{/branch}","tags_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/tags","blobs_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/statuses/{sha}","languages_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/languages","stargazers_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/stargazers","contributors_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/contributors","subscribers_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/subscribers","subscription_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/subscription","commits_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/contents/{+path}","compare_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/merges","archive_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/downloads","issues_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues{/number}","pulls_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls{/number}","milestones_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/milestones{/number}","notifications_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/labels{/name}","releases_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/releases{/id}","created_at":"2013-01-19T06:10:53Z","updated_at":"2015-08-15T08:27:07Z","pushed_at":"2015-08-22T11:06:23Z","git_url":"git://github.com/scp-fs2open/fs2open.github.com.git","ssh_url":"git@github.com:scp-fs2open/fs2open.github.com.git","clone_url":"https://github.com/scp-fs2open/fs2open.github.com.git","svn_url":"https://github.com/scp-fs2open/fs2open.github.com","homepage":null,"size":115742,"stargazers_count":23,"watchers_count":23,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":42,"mirror_url":null,"open_issues_count":19,"forks":42,"open_issues":19,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/303"},"html":{"href":"https://github.com/scp-fs2open/fs2open.github.com/pull/303"},"issue":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/303"},"comments":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/statuses/cd3b543e56f188ee10c12df7a5dc8d977a70a340"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"asarium","id":1013983,"avatar_url":"https://avatars.githubusercontent.com/u/1013983?v=3","gravatar_id":"","url":"https://api.github.com/users/asarium","html_url":"https://github.com/asarium","followers_url":"https://api.github.com/users/asarium/followers","following_url":"https://api.github.com/users/asarium/following{/other_user}","gists_url":"https://api.github.com/users/asarium/gists{/gist_id}","starred_url":"https://api.github.com/users/asarium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asarium/subscriptions","organizations_url":"https://api.github.com/users/asarium/orgs","repos_url":"https://api.github.com/users/asarium/repos","events_url":"https://api.github.com/users/asarium/events{/privacy}","received_events_url":"https://api.github.com/users/asarium/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":91,"deletions":83,"changed_files":1}}