Fix a crash uploading blobs.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4359 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2023-07-22 01:24:58 +00:00
parent f3169afcf5
commit 07c121044a

View File

@ -234,7 +234,7 @@ void _tf_ssb_blob_store_callback(const char* id, bool is_new, void* user_data)
static JSValue _tf_ssb_blobStore(JSContext* context, JSValueConst this_val, int argc, JSValueConst* argv) static JSValue _tf_ssb_blobStore(JSContext* context, JSValueConst this_val, int argc, JSValueConst* argv)
{ {
blob_store_t* store = tf_malloc(sizeof(blob_store_t)); blob_store_t* store = tf_malloc(sizeof(blob_store_t));
*store = (blob_store_t) { 0 }; *store = (blob_store_t) { .context = context };
JSValue result = JS_NewPromiseCapability(context, store->promise); JSValue result = JS_NewPromiseCapability(context, store->promise);
tf_ssb_t* ssb = JS_GetOpaque(this_val, _tf_ssb_classId); tf_ssb_t* ssb = JS_GetOpaque(this_val, _tf_ssb_classId);