mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-07-27 08:28:53 +00:00
Compare commits
2 Commits
copilot/su
...
copilot/su
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
946c5a2d9b | ||
|
|
0e370ef62f |
@@ -4309,7 +4309,7 @@ struct tg3_writer {
|
||||
TINYGLTF3_API tg3_writer *tg3_writer_create(
|
||||
tg3_write_chunk_fn chunk_fn, void *user_data,
|
||||
const tg3_write_options *options) {
|
||||
tg3_writer *w = (tg3_writer *)calloc(1, sizeof(tg3_writer));
|
||||
tg3_writer *w = new (std::nothrow) tg3_writer();
|
||||
if (!w) return NULL;
|
||||
w->chunk_fn = chunk_fn;
|
||||
w->user_data = user_data;
|
||||
@@ -4385,10 +4385,7 @@ TINYGLTF3_API tg3_error_code tg3_writer_end(tg3_writer *w) {
|
||||
}
|
||||
|
||||
TINYGLTF3_API void tg3_writer_destroy(tg3_writer *w) {
|
||||
if (w) {
|
||||
w->root.~tinygltf_json();
|
||||
free(w);
|
||||
}
|
||||
delete w;
|
||||
}
|
||||
|
||||
#endif /* TINYGLTF3_IMPLEMENTATION */
|
||||
|
||||
Reference in New Issue
Block a user