1
0
Fork 0

fixed segfault

This commit is contained in:
Jan Steemann 2016-01-25 14:20:06 +01:00
parent 7800085a9b
commit 3dc247e18b
2 changed files with 7 additions and 5 deletions

View File

@ -52,7 +52,7 @@ struct QueryResult {
other.warnings = nullptr;
other.json = nullptr;
other.stats = other.stats;
other.stats = nullptr;
other.profile = nullptr;
other.clusterplan = nullptr;
}

View File

@ -1329,10 +1329,12 @@ static void JS_ExecuteAql(v8::FunctionCallbackInfo<v8::Value> const& args) {
result->ForceSet(TRI_V8_ASCII_STRING("json"), queryResult.result);
VPackSlice stats = queryResult.stats->slice();
if (!stats.isNone()) {
result->ForceSet(TRI_V8_ASCII_STRING("stats"),
TRI_VPackToV8(isolate, stats));
if (queryResult.stats != nullptr) {
VPackSlice stats = queryResult.stats->slice();
if (!stats.isNone()) {
result->ForceSet(TRI_V8_ASCII_STRING("stats"),
TRI_VPackToV8(isolate, stats));
}
}
if (queryResult.profile != nullptr) {
result->ForceSet(TRI_V8_ASCII_STRING("profile"),