Skip to content

Commit 265bb56

Browse files
committed
fix -c help
The rxtx constructor still may throw but in the recent commit 5098035 the "master" check was removed. The original was mainly intended to catch rxtx_info::create (module init) but our constructor actually throws (now presumably only).
1 parent 0c3f558 commit 265bb56

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/rxtx.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,12 @@ rxtx::create(string const &proto,
390390
return nullptr;
391391
}
392392

393-
rxtx *ret = new rxtx(proto.c_str(), params);
393+
rxtx *ret = nullptr;
394+
try {
395+
ret = new rxtx(proto.c_str(), params);
396+
} catch (int i) {
397+
return i < 0 ? nullptr : (rxtx *) INIT_NOERR;
398+
}
394399

395400
auto params_c = *params;
396401
params_c.sender_mod = &ret->m_sender_mod;

0 commit comments

Comments
 (0)