mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-02 05:07:53 -04:00
Handle info_buf possible nullptr
This commit is contained in:
parent
305cd4bf5b
commit
f9ee9b9145
@ -52,7 +52,12 @@ void RigThread::run() {
|
||||
}
|
||||
|
||||
char *info_buf = (char *)rig_get_info(rig);
|
||||
std::cout << "Rig info: " << info_buf << std::endl;
|
||||
|
||||
if (info_buf) {
|
||||
std::cout << "Rig info: " << info_buf << std::endl;
|
||||
} else {
|
||||
std::cout << "Rig info was NULL." << std::endl;
|
||||
}
|
||||
|
||||
while (!terminated.load()) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(150));
|
||||
|
Loading…
x
Reference in New Issue
Block a user