Salome HOME
Fixed problem with too many executions of extrusion wit hexternal sketch edges
[modules/shaper.git] / src / Events / Events_Error.cpp
index ae5d83c375c5182736ba73aa3fe4e1ca19f18535..3ac990edb5893922ecb85a3cca24c1fe0276055c 100644 (file)
@@ -9,7 +9,7 @@
 #include <Events_Loop.h>
 
 Events_Error::Events_Error(char* theDescription, const void* theSender)
- : Events_Message(Events_Error::errorID(), theSender)
   : Events_Message(Events_Error::errorID(), theSender)
 {
   myDescription = theDescription;
 }
@@ -31,11 +31,12 @@ char* Events_Error::description() const
 
 void Events_Error::send(char* theDescription, const void* theSender)
 {
-  Events_Error anError(theDescription, theSender);
-  Events_Loop::loop()->send(anError);
+  boost::shared_ptr<Events_Message> aNewOne = 
+    boost::shared_ptr<Events_Message>(new Events_Error(theDescription, theSender));
+  Events_Loop::loop()->send(aNewOne);
 }
 
 void Events_Error::send(std::string theDescription, const void* theSender)
 {
-  Events_Error::send(theDescription.c_str(), theSender);
+  Events_Error::send((char*) theDescription.c_str(), theSender);
 }