summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slicer/db/sqlSelectDeserializer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/slicer/db/sqlSelectDeserializer.cpp b/slicer/db/sqlSelectDeserializer.cpp
index a7dd575..b0ce145 100644
--- a/slicer/db/sqlSelectDeserializer.cpp
+++ b/slicer/db/sqlSelectDeserializer.cpp
@@ -96,12 +96,12 @@ namespace Slicer {
rmp->Create();
for (auto col = 0u; col < columnCount; col += 1) {
const DB::Column & c = cmd[col];
- SqlSourcePtr h = new SqlSource(c);
- if (!h->isNull()) {
+ if (!c.isNull()) {
auto fmpr = rmp->GetAnonChildRef([&c](Slicer::HookCommonPtr h) {
return boost::iequals(c.name.raw(), h->PartName());
});
if (fmpr) {
+ SqlSourcePtr h = new SqlSource(c);
auto fmp = fmpr->Child();
fmp->Create();
fmp->SetValue(h);