Fixed crash in SocketSelector::add when passing an invalid socket

This commit is contained in:
Laurent Gomila 2012-06-26 21:55:45 +02:00
parent 5706111088
commit aa534a0936
2 changed files with 10 additions and 5 deletions

View file

@ -70,6 +70,7 @@ public :
/// This function keeps a weak reference to the socket,
/// so you have to make sure that the socket is not destroyed
/// while it is stored in the selector.
/// This function does nothing if the socket is not valid.
///
/// \param socket Reference to the socket to add
///
@ -186,7 +187,7 @@ private :
/// A selector doesn't store its own copies of the sockets
/// (socket classes are not copyable anyway), it simply keeps
/// a reference to the original sockets that you pass to the
/// Add function. Therefore, you can't use the selector as a
/// "add" function. Therefore, you can't use the selector as a
/// socket container, you must store them oustide and make sure
/// that they are alive as long as they are used in the selector.
///