diff --git a/src/product.cc b/src/product.cc index 42ed941d44..2877f408d9 100644 --- a/src/product.cc +++ b/src/product.cc @@ -78,7 +78,7 @@ int Product::package_id() { } void Product::ChangePackageId(int new_package_id) { - if (ctx_ == NULL) { + if (ctx_ != NULL) { throw ValueError("Package Id cannot be changed with NULL context"); } if (new_package_id == package_id_) {