Skip to content

Commit 9266ee2

Browse files
committed
Fixes issue with C-API copy_options function
Some options were lost when we overwrite ourselves.
1 parent 9003a00 commit 9266ee2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sass_context.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ extern "C" {
259259
static void sass_clear_options (struct Sass_Options* options);
260260
static void sass_reset_options (struct Sass_Options* options);
261261
static void copy_options(struct Sass_Options* to, struct Sass_Options* from) {
262+
// do not overwrite ourself
263+
if (to == from) return;
262264
// free assigned memory
263265
sass_clear_options(to);
264266
// move memory

0 commit comments

Comments
 (0)