q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=aab5cc03ff4cdbf656486f39869cc9b396ef3b68

commit aab5cc03ff4cdbf656486f39869cc9b396ef3b68
Author: Lauro Moura <[email protected]>
Date:   Wed Dec 6 13:10:43 2017 -0300

    eolian_cxx: Fix unit initialization
    
    Summary:
    eolian_cxx was segfaulting due to a null unit being passed to
    class_get_by_file.
    
    Reviewers: felipealmeida, jpeg, q66
    
    Differential Revision: https://phab.enlightenment.org/D5611
---
 src/bin/eolian_cxx/eolian_cxx.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index a407220bc6..c6514baf6c 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -278,7 +278,8 @@ run(options_type const& opts)
        char* dup = strdup(opts.in_files[0].c_str());
        char* base = basename(dup);
        std::string cpp_types_header;
-       klass = ::eolian_class_get_by_file(nullptr, base);
+       opts.unit = (Eolian_Unit*)opts.state;
+       klass = ::eolian_class_get_by_file(opts.unit, base);
        free(dup);
        if (klass)
          {

-- 


Reply via email to