diff --git a/Pcap++/src/PcapLiveDevice.cpp b/Pcap++/src/PcapLiveDevice.cpp index e2a17fb575..8835b2ee1c 100644 --- a/Pcap++/src/PcapLiveDevice.cpp +++ b/Pcap++/src/PcapLiveDevice.cpp @@ -616,7 +616,7 @@ namespace pcpp if (ready > 0) { - if (pcap_dispatch(m_PcapDescriptor.value(), -1, onPacketArrivesBlockingMode, + if (pcap_dispatch(m_PcapDescriptor.get(), -1, onPacketArrivesBlockingMode, reinterpret_cast(this)) == -1) { PCPP_LOG_ERROR("pcap_dispatch returned an error: " << m_PcapDescriptor.getLastErrorView());