1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Add assert checks for ProfChatWin functions

This commit is contained in:
James Booth 2015-10-26 23:11:38 +00:00
parent 9d3bcf5f90
commit 93c3feeacf

View File

@ -34,6 +34,7 @@
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include "chat_session.h"
#include "window_list.h"
@ -49,6 +50,8 @@ static void _win_show_history(ProfChatWin *chatwin, const char *const contact);
void
ui_message_receipt(ProfChatWin *chatwin, const char *const id)
{
assert(chatwin != NULL);
ProfWin *win = (ProfWin*) chatwin;
win_mark_received(win, id);
}
@ -56,6 +59,8 @@ ui_message_receipt(ProfChatWin *chatwin, const char *const id)
void
ui_gone_secure(ProfChatWin *chatwin, gboolean trusted)
{
assert(chatwin != NULL);
chatwin->is_otr = TRUE;
chatwin->otr_is_trusted = trusted;
@ -84,6 +89,8 @@ ui_gone_secure(ProfChatWin *chatwin, gboolean trusted)
void
ui_gone_insecure(ProfChatWin *chatwin)
{
assert(chatwin != NULL);
chatwin->is_otr = FALSE;
chatwin->otr_is_trusted = FALSE;