ttsnoop: check the return value from tt_message_op to avoid a segmentation
fault.
This commit is contained in:
@@ -559,7 +559,7 @@ _DtTtChoices(
|
|||||||
std::ostringstream itemStream;
|
std::ostringstream itemStream;
|
||||||
itemStream << (void *)dtTtMessages[ i ];
|
itemStream << (void *)dtTtMessages[ i ];
|
||||||
char *op = tt_message_op( 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;
|
itemStream << " " << op;
|
||||||
tt_free( op );
|
tt_free( op );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user