Skip to content

Commit

Permalink
Fix #6 -- Crash on C4D exit in release build
Browse files Browse the repository at this point in the history
In webp.cpp, we used the C++ new operator to create the plugin objects,
but we must use NewObjClear().
  • Loading branch information
NiklasRosenstein committed Sep 12, 2018
1 parent 53d603e commit 6127307
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/webpio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,13 @@ Bool RegisterWebpIO() {
/* id */ ID_WEBP_BITMAP_LOADER,
/* name */ "WebP"_s,
/* info */ 0,
/* data */ new WebPBitmapImporter);
/* data */ NewObjClear(WebPBitmapImporter));

RegisterBitmapSaverPlugin(
/* id */ ID_WEBP_BITMAP_SAVER,
/* name */ "WebP"_s,
/* info */ PLUGINFLAG_BITMAPSAVER_SUPPORT_8BIT | PLUGINFLAG_BITMAPSAVER_FORCESUFFIX,
/* data */ new WebPBitmapExporter,
/* data */ NewObjClear(WebPBitmapExporter),
/* suffix */ "webp"_s);

return true;
Expand Down

0 comments on commit 6127307

Please sign in to comment.