Ver código fonte

Merge pull request #771 from jakesmith/nwayselectbug

NWaySelect late initialization causing crash

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 13 anos atrás
pai
commit
be7f9eebd1
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      thorlcr/activities/funnel/thfunnelslave.cpp

+ 3 - 0
thorlcr/activities/funnel/thfunnelslave.cpp

@@ -850,6 +850,7 @@ public:
     CNWaySelectActivity(CGraphElementBase *_container) : CSlaveActivity(_container), CThorDataLink(this), CThorSteppable(this)
     {
         helper = (IHThorNWaySelectArg *)queryHelper();
+        selectedInput = NULL;
     }
     void init(MemoryBuffer &data, MemoryBuffer &slaveData)
     {
@@ -934,6 +935,8 @@ public:
         initMetaInfo(info);
         if (selectedInput)
             calcMetaInfoSize(info, selectedInput);
+        else if (!started())
+            info.canStall = true; // unkwown if !started
     }
     virtual bool isGrouped() { return selectedInput ? selectedInput->isGrouped() : false; }
 // steppable