Skip to content

NullPointers with several wraps #3

@OmegaK2

Description

@OmegaK2

Several wraps may use a null pointer internally; thus causing a server crash when trying to call member functions.

This can probably happen for more wraps then the examples, and this is an problem that should be fixed as a whole when wrapping the game's interfaces.

It should either mimic the behaviour and simply return a python None object, so you can work with a nonetype error, or raise a python exception or so.
As an extend, this also becomes problem if a pointer becomes null for some reason, in the original SP write this wasn't as much of an issue, as it would be simply none then, but since all the methods are abstracted, it might just crash when trying to call member functions.

CPlayerInfo
player_connect: IPlayerInfo does not work so early on, i.e. the object returned is NULL, but you can create an instance of CPlayerInfo, and once you call any member function the server crashes

CNetChannelInfo
-> INetChanneInfo returns NULL for bots, so if you use it on bots, server will crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions