summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2017-12-06 13:10:43 -0300
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-12-06 17:42:46 +0100
commitaab5cc03ff4cdbf656486f39869cc9b396ef3b68 (patch)
tree748b10e96a9d2f7172fd82eb7e135058ea26307d /src/bin
parenteee6fbad780abf36029ae2a064d645d4853c27ae (diff)
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
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc3
1 files changed, 2 insertions, 1 deletions
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)
278 char* dup = strdup(opts.in_files[0].c_str()); 278 char* dup = strdup(opts.in_files[0].c_str());
279 char* base = basename(dup); 279 char* base = basename(dup);
280 std::string cpp_types_header; 280 std::string cpp_types_header;
281 klass = ::eolian_class_get_by_file(nullptr, base); 281 opts.unit = (Eolian_Unit*)opts.state;
282 klass = ::eolian_class_get_by_file(opts.unit, base);
282 free(dup); 283 free(dup);
283 if (klass) 284 if (klass)
284 { 285 {