Browse Source

HPCC-14727 Fix issue picked up in review (ctx may be NULL)

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Jake Smith 9 years ago
parent
commit
cff80d6459
1 changed files with 7 additions and 1 deletions
  1. 7 1
      dali/base/dadfs.cpp

+ 7 - 1
dali/base/dadfs.cpp

@@ -4912,7 +4912,13 @@ protected:
                         if (!subfroot->removeProp(oquery.str()))
                         {
                             VStringBuffer s("SubFile %s is not owned by SuperFile %s", name, logicalName.get());
-                            ctx->addWuException(s.str(), 0, SeverityWarning, "DFS[clearSuperOwner]");
+                            if (ctx)
+                                ctx->addWuException(s.str(), 0, SeverityWarning, "DFS[clearSuperOwner]");
+                            else
+                            {
+                                Owned<IException> e = makeStringException(-1, s.str());
+                                EXCLOG(e, "DFS[clearSuperOwner]");
+                            }
                         }
                     }
                 }