Commit de2ac484 by Aaron Leung

Allowing the interface to ignore NULL pointers in the context object.

parent cc2c9ca7
......@@ -17,8 +17,8 @@ extern "C" char* sass_compile(sass_context* c_ctx)
// TO DO: CATCH ALL EXCEPTIONS
Context cpp_ctx;
cpp_ctx.sass_path = string(c_ctx->sass_path);
cpp_ctx.css_path = string(c_ctx->css_path);
cpp_ctx.sass_path = string(c_ctx->sass_path ? c_ctx->sass_path : "");
cpp_ctx.css_path = string(c_ctx->css_path ? c_ctx->css_path : "");
const size_t wd_len = 1024;
char wd[wd_len];
......
......@@ -28,9 +28,9 @@ int main(int argc, char** argv)
}
struct sass_context* ctx = sass_new_context();
ctx->sass_path = "";
ctx->css_path = "";
ctx->include_paths = "";
ctx->sass_path = NULL;
ctx->css_path = NULL;
ctx->include_paths = NULL;
ctx->output_style = 0;
ctx->input_file = argv[1];
ctx->input_string = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment