1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00

ttsnoop: check the return value from tt_message_op to avoid a segmentation

fault.
This commit is contained in:
Liang Chang 2021-02-20 01:35:13 +08:00 committed by Jon Trulson
parent 75a4e93d38
commit 7cd4221824

View file

@ -559,7 +559,7 @@ _DtTtChoices(
std::ostringstream itemStream;
itemStream << (void *)dtTtMessages[ i ];
char *op = tt_message_op( dtTtMessages[ i ] );
if (! tt_is_err( tt_ptr_error( op ))) {
if (op && ! tt_is_err( tt_ptr_error( op ))) {
itemStream << " " << op;
tt_free( op );
}