Skip to content
Snippets Groups Projects
Commit 137ac067 authored by sbbs's avatar sbbs
Browse files

Fixed crash (null pointer defefernce) when reading email/netmail, as reported

by Bill McGarrity: new bug.
parent 6f87d204
No related branches found
No related tags found
No related merge requests found
/* Synchronet message retrieval functions */
/* $Id$ */
// vi: tabstop=4
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
......@@ -183,7 +184,7 @@ void sbbs_t::show_msg(smbmsg_t* msg, long mode, post_t* post)
{
char* txt;
if((msg->hdr.type == SMB_MSG_TYPE_NORMAL && (post->upvotes || post->downvotes))
if((msg->hdr.type == SMB_MSG_TYPE_NORMAL && post != NULL && (post->upvotes || post->downvotes))
|| msg->hdr.type == SMB_MSG_TYPE_POLL)
msg->user_voted = smb_voted_already(&smb, msg->hdr.number
,cfg.sub[smb.subnum]->misc&SUB_NAME ? useron.name : useron.alias, NET_NONE, NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment