]> git.tdb.fi Git - gldbg.git/blobdiff - source/gldbg.cpp
Refuse to send packets to an inactive process
[gldbg.git] / 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);
 }