[vala] codegen: Fix critical on symbols without source reference
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Fix critical on symbols without source reference
- Date: Thu, 7 Oct 2010 21:19:09 +0000 (UTC)
commit bda74d748dcdb0ce94daafa03ee3dad16ffab1c2
Author: Jürg Billeter <j bitron ch>
Date: Thu Oct 7 23:18:17 2010 +0200
codegen: Fix critical on symbols without source reference
codegen/valaccodebasemodule.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index fb52bf8..5c06956 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -486,7 +486,9 @@ public class Vala.CCodeBaseModule : CodeGenerator {
if (decl_space.add_declaration (name)) {
return true;
}
- sym.source_reference.file.used = true;
+ if (sym.source_reference != null) {
+ sym.source_reference.file.used = true;
+ }
if (sym.external_package || (!decl_space.is_header && CodeContext.get ().use_header && !sym.is_internal_symbol ())) {
// add appropriate include file
foreach (string header_filename in sym.get_cheader_filenames ()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]