Added a NULL pointer check. Eliminates a way to crash the app_server in just two keystrokes. :P

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8285 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2004-07-02 22:02:19 +00:00
parent 42acbc704c
commit 9a663361f2
+1 -1
View File
@@ -136,7 +136,7 @@ status_t PortLink::FlushToSession()
status_t PortLink::Attach(const void *data, size_t size)
{
if (size <= 0)
if (!data || size <= 0)
return B_ERROR;
if (SESSION_BUFFER_SIZE - fSendPosition > (int32)size)