Qt: Add check for running toolbar reader thread
Check if the reader thread is running before calling requestInterruption() in an attempt to avoid a crash when stop capture. Change-Id: I07cdc19eb42413ce421f05186314fc34c33041e6 Ping-Bug: 14631 Reviewed-on: https://code.wireshark.org/review/27316 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
751e9463ce
commit
895cfbfd01
|
@ -771,7 +771,10 @@ void InterfaceToolbar::stopCapture()
|
||||||
{
|
{
|
||||||
if (interface_[ifname].reader_thread)
|
if (interface_[ifname].reader_thread)
|
||||||
{
|
{
|
||||||
interface_[ifname].reader_thread->requestInterruption();
|
if (!interface_[ifname].reader_thread->isFinished())
|
||||||
|
{
|
||||||
|
interface_[ifname].reader_thread->requestInterruption();
|
||||||
|
}
|
||||||
interface_[ifname].reader_thread = NULL;
|
interface_[ifname].reader_thread = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue