[ekiga] Made the service core object segfaul if asked something while closed (in DEBUG mode only!)



commit a276bae81f79ebc8d013e85b71e0addae779c5f6
Author: Julien Puydt <jpuydt free fr>
Date:   Wed Jan 23 09:53:04 2013 +0100

    Made the service core object segfaul if asked something while closed (in DEBUG mode only!)

 lib/engine/framework/services.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/lib/engine/framework/services.cpp b/lib/engine/framework/services.cpp
index 5591ad4..130bdd0 100644
--- a/lib/engine/framework/services.cpp
+++ b/lib/engine/framework/services.cpp
@@ -41,6 +41,7 @@
 
 #if DEBUG
 #include <iostream>
+#include <signal.h>
 #endif
 
 #include "services.h"
@@ -162,9 +163,9 @@ Ekiga::ServiceCore::get (const std::string name)
     std::cout << "Ekiga::ServiceCore doesn't have " << name << std::endl;
 
   if (closed)
-    return ServicePtr();
-  else
-    return result;
+    raise (SIGSEGV);
+
+  return result;
 
 #else
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]