]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Fix for bug IPAL9222 : 3.0.0(/dn06/../current1506): SIGSEGV appears after trying...
authormkr <mkr@opencascade.com>
Thu, 14 Jul 2005 06:55:01 +0000 (06:55 +0000)
committermkr <mkr@opencascade.com>
Thu, 14 Jul 2005 06:55:01 +0000 (06:55 +0000)
src/SUPERVGUI/SUPERVGUI_Service.cxx

index 0c9f5424aacb68934ad4e455b83f4e937ec11872..11d0b8fffe58f40ebab06142861639f2ba5b3b61 100644 (file)
@@ -511,8 +511,9 @@ void SUPERVGUI_Service::addInlineNode() {
     switch (aSel) {
     case 0: // Computation
       {        
-       SUPERV_CNode aNode = aMain->getDataflow()->INode(myScriptPane->getFuncName().latin1(), 
-                                                        (myScriptPane->getFunction()).in());
+       SUPERV_CNode aNode = 
+         aMain->getDataflow()->INode(myScriptPane->getFuncName().isEmpty() ? "" : myScriptPane->getFuncName().latin1(), 
+                                     (myScriptPane->getFunction()).in());
        if (CORBA::is_nil(aNode)) {
          QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));       
          return;
@@ -525,9 +526,10 @@ void SUPERVGUI_Service::addInlineNode() {
     case 1: // Switch
       {
        SUPERV_INode aEndNode;
-       SUPERV_CNode aStartNode = aMain->getDataflow()->SNode(myScriptPane->getFuncName().latin1(),
-                                                             (myScriptPane->getFunction()).in(),
-                                                             aEndNode);
+       SUPERV_CNode aStartNode = 
+         aMain->getDataflow()->SNode(myScriptPane->getFuncName().isEmpty() ? "" : myScriptPane->getFuncName().latin1(),
+                                     (myScriptPane->getFunction()).in(),
+                                     aEndNode);
        if (CORBA::is_nil(aStartNode) || CORBA::is_nil(aEndNode)) {
          QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));       
          return;
@@ -539,10 +541,14 @@ void SUPERVGUI_Service::addInlineNode() {
     case 2: // Loop
       {
        SUPERV_INode aEndNode;
-       SUPERV_CNode aStartNode = aMain->getDataflow()->LNode(myInitPane->getFuncName().latin1(), (myInitPane->getFunction()).in(),
-                                                             myMorePane->getFuncName().latin1(), (myMorePane->getFunction()).in(),
-                                                             myNextPane->getFuncName().latin1(), (myNextPane->getFunction()).in(),
-                                                             aEndNode);
+       SUPERV_CNode aStartNode = 
+         aMain->getDataflow()->LNode(myInitPane->getFuncName().isEmpty() ? "" : myInitPane->getFuncName().latin1(), 
+                                     (myInitPane->getFunction()).in(),
+                                     myMorePane->getFuncName().isEmpty() ? "" : myMorePane->getFuncName().latin1(), 
+                                     (myMorePane->getFunction()).in(),
+                                     myNextPane->getFuncName().isEmpty() ? "" : myNextPane->getFuncName().latin1(), 
+                                     (myNextPane->getFunction()).in(),
+                                     aEndNode);
        if (CORBA::is_nil(aStartNode) || CORBA::is_nil(aEndNode)) {
          QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));       
          return;