ttsnoop: fix a segfault that occurred when clicking "Version..." in the "Snoop"

menu.
This commit is contained in:
Liang Chang 2021-02-05 05:02:19 +08:00
parent de23f29722
commit 7b2aae0911
1 changed files with 3 additions and 1 deletions

View File

@ -1357,7 +1357,9 @@ printVersion(
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
snoopStream << "ttsnoop: " << globalVersionString << endl;
snoopStream << "tt_c.h: " << TT_VERSION << endl;
snoopStream << "libtt: " << _tt_lib_version << endl;
if (_tt_lib_version)
snoopStream << "libtt: " << _tt_lib_version << endl;
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}