Skip to content

Commit 8ef05d4

Browse files
committed
InputValue: Fix warning when setting null value pointer
1 parent 0209ae0 commit 8ef05d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/scratch/inputvalue.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ void InputValue::setValuePtr(const std::shared_ptr<Entity> &newValuePtr)
120120
else {
121121
impl->valuePtr = nullptr;
122122
impl->valueId = "";
123-
std::cout << "warning: unsupported input value type (use InputValue::setValueBlock() to set the block)" << std::endl;
123+
124+
if (newValuePtr)
125+
std::cout << "warning: unsupported input value type (use InputValue::setValueBlock() to set the block)" << std::endl;
126+
124127
return;
125128
}
126129

0 commit comments

Comments
 (0)