checking decoded_buffer for NULL
This commit is contained in:
parent
f6d005551a
commit
b41d5703f4
@ -500,6 +500,12 @@ void *why2_communicate_thread(void *arg)
|
|||||||
|
|
||||||
decoded_buffer = get_string_from_json_string(raw, "message"); //DECODE
|
decoded_buffer = get_string_from_json_string(raw, "message"); //DECODE
|
||||||
|
|
||||||
|
if (decoded_buffer == NULL) //idk sometimes this happen, idk why
|
||||||
|
{
|
||||||
|
force_exiting = 1;
|
||||||
|
goto deallocation;
|
||||||
|
}
|
||||||
|
|
||||||
if (decoded_buffer[0] == '!') //COMMANDS
|
if (decoded_buffer[0] == '!') //COMMANDS
|
||||||
{
|
{
|
||||||
if (strcmp(decoded_buffer, "!exit") == 0) //USER REQUESTED EXIT
|
if (strcmp(decoded_buffer, "!exit") == 0) //USER REQUESTED EXIT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user