From: Mikko Rasa Date: Sat, 25 Aug 2012 17:13:12 +0000 (+0300) Subject: Refuse to send packets to an inactive process X-Git-Url: http://git.tdb.fi/?p=gldbg.git;a=commitdiff_plain;h=efd709c6cdac15b7823e80ed64e448003aea835d Refuse to send packets to an inactive process --- 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); }