Skip to content

Commit 103064e

Browse files
committed
fix(core): fix HippyValue ToString crash
1 parent a08bb81 commit 103064e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/footstone/src/hippy_value.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,9 @@ bool HippyValue::ToBooleanChecked() const {
426426

427427
bool HippyValue::ToString(std::string& str) const {
428428
bool is_string = IsString();
429-
str = str_;
429+
if (is_string) {
430+
str = str_;
431+
}
430432
return is_string;
431433
}
432434

0 commit comments

Comments
 (0)