Salome HOME
ConnectorPlugin to export shapes to GEOM
[modules/shaper.git] / src / Config / Config_WidgetAPI.cpp
index 994a46f99c9a300205331c5c5d1c85389e964535..bcf543bd17e21d93e81cfa832545a3672d594d8c 100644 (file)
@@ -47,10 +47,10 @@ bool Config_WidgetAPI::toChildWidget()
 {
   if (myCurrentNode && hasChild(myCurrentNode)) {
     myCurrentNode = myCurrentNode->children;
-    while (!isElementNode(myCurrentNode)) {
+    while (myCurrentNode && !isElementNode(myCurrentNode)) {
       myCurrentNode = myCurrentNode->next;
     }
-    return true;
+    return myCurrentNode != NULL;
   }
   return false;
 }