diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-11-26 16:37:06 -0500 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-11-26 16:37:06 -0500 |
commit | e45b3b0ff2ffc9bee6f090a4744f6d5eb6da8b72 (patch) | |
tree | 8f57909106521bd16375068ebbf573021d074feb /src/printer/printer.h | |
parent | 18421d3a95b42e85dcd7cb5935d4b2519b168007 (diff) |
Fix a segfault in the printer infrastructure when called from API and no language is set
Diffstat (limited to 'src/printer/printer.h')
-rw-r--r-- | src/printer/printer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/printer/printer.h b/src/printer/printer.h index d3a9201ee..6fe1ec279 100644 --- a/src/printer/printer.h +++ b/src/printer/printer.h @@ -53,6 +53,9 @@ protected: public: /** Get the Printer for a given OutputLanguage */ static Printer* getPrinter(OutputLanguage lang) throw() { + if(lang == language::output::LANG_AUTO) { + lang = language::output::LANG_CVC4; // default + } if(d_printers[lang] == NULL) { d_printers[lang] = makePrinter(lang); } |