Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Jun 28, 2021
1 parent 3bb5b00 commit d4bc19d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions android/src/main/cpp/JImageProxyHostObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jsi::Value JImageProxyHostObject::get(jsi::Runtime& runtime, const jsi::PropName
return jsi::Function::createFromHostFunction(runtime, jsi::PropNameID::forUtf8(runtime, "toString"), 0, toString);
}
if (name == "close") {
auto close = [this] (jsi::Runtime&, const jsi::Value&, const jsi::Value*, size_t) -> jsi::Value {
if (this.frame.get() == nullptr) {
auto close = [this] (jsi::Runtime& runtime, const jsi::Value&, const jsi::Value*, size_t) -> jsi::Value {
if (!this->frame) {
throw jsi::JSError(runtime, "Trying to close an already closed frame! Did you call frame.close() twice?");
}
this->close();
Expand Down Expand Up @@ -73,7 +73,7 @@ JImageProxyHostObject::~JImageProxyHostObject() {
}

void JImageProxyHostObject::close() {
if (this.frame.get() != nullptr) {
if (this->frame) {
this->frame->close();
this->frame.release();
}
Expand Down

0 comments on commit d4bc19d

Please sign in to comment.