{"comment":{"created_at":"2011-10-16T13:33:23Z","body":"For example\r\n\r\nSAMPGDK_EXPORT bool SAMPGDK_CALL NonExistentFunc(int playerid) {\r\n    static AMX_NATIVE native = Wrapper::GetInstance()->GetNative(\"NonExistentFunc\");\r\n\r\n    if(native == NULL) return false; // Maybe you should try to check is the pointer null here?\r\n\r\n    cell params[] = {\r\n        1 * 4,\r\n        playerid\r\n    };\r\n    return native(&::fakeAmx, params) != 0;\r\n}","updated_at":"2011-10-16T13:33:23Z","url":"https://api.github.com/repos/Zeex/sampgdk/issues/comments/2420830","id":2420830,"user":{"gravatar_id":"50ea624fe6b0f65f61a19922f7055016","avatar_url":"https://secure.gravatar.com/avatar/50ea624fe6b0f65f61a19922f7055016?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/freshrat","id":968003,"login":"freshrat"}},"action":"created","issue":{"number":13,"created_at":"2011-10-15T19:12:11Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"So, sometimes we need to define our own natives and if them does not exists the server crashes.\r\n\r\nFor example, if we are using a native of another plugin, and when the server start occur some error in the plugin load, when the native is called, the server will crash.\r\n\r\nNot properly an issue, it's a suggestion to solve.","comments":1,"title":"The server crashes if executed a non-existent native","updated_at":"2011-10-16T13:33:23Z","url":"https://api.github.com/repos/Zeex/sampgdk/issues/13","id":1918727,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"920ec43f7a29e6eaa5fd5f376452c563","avatar_url":"https://secure.gravatar.com/avatar/920ec43f7a29e6eaa5fd5f376452c563?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/allanjader","id":1108528,"login":"allanjader"},"html_url":"https://github.com/Zeex/sampgdk/issues/13","labels":[],"state":"open"},"legacy":{"issue_id":1918727,"comment_id":2420830}}