From efd709c6cdac15b7823e80ed64e448003aea835d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 25 Aug 2012 20:13:12 +0300 Subject: [PATCH] Refuse to send packets to an inactive process --- source/gldbg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/gldbg.cpp b/source/gldbg.cpp index dd0476d..4bc169f 100644 --- a/source/gldbg.cpp +++ b/source/gldbg.cpp @@ -98,6 +98,9 @@ void GlDbg::launch() void GlDbg::send(GlPacket *pkt) { + if(process.get_state()==Process::INACTIVE) + throw runtime_error("Program is not running"); + packet_send(pkt, sock_fd); } -- 2.45.2