]> git.tdb.fi Git - gldbg.git/commitdiff
Refuse to send packets to an inactive process
authorMikko Rasa <tdb@tdb.fi>
Sat, 25 Aug 2012 17:13:12 +0000 (20:13 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 25 Aug 2012 17:32:06 +0000 (20:32 +0300)
source/gldbg.cpp

index dd0476d4168db408f8a990792f94cc0e436c466a..4bc169fcd0079abb2f99811a87db777266e4e86f 100644 (file)
@@ -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);
 }