diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-11-16 12:12:38 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-11-16 12:12:38 +0000 |
| commit | 804b8cc6e5913913a76894a753619590a291c204 (patch) | |
| tree | d816147bb2f7119c758f192e65256ee5eb1d746d | |
| parent | 6223b6a3efe7591feae9a342ad92f34e1aefed54 (diff) | |
check to make sure the style config could be loaded
| -rw-r--r-- | otk/application.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/otk/application.cc b/otk/application.cc index 490486ec..16b9e0f5 100644 --- a/otk/application.cc +++ b/otk/application.cc @@ -1,6 +1,12 @@ #include "application.hh" #include "eventhandler.hh" +extern "C" { +#ifdef HAVE_STDLIB_H +# include <stdlib.h> +#endif +} + #include <iostream> namespace otk { @@ -35,8 +41,12 @@ OtkApplication::~OtkApplication() void OtkApplication::loadStyle(void) { // find the style name as a property - _style_conf->setFile("/usr/local/share/openbox/styles/artwiz"); - _style_conf->load(); + std::string style = "/usr/local/share/openbox/styles/artwiz"; + _style_conf->setFile(style); + if (!_style_conf->load()) { + std::cerr << "Unable to load style \"" << style << "\". Aborting.\n"; + ::exit(1); + } _style->load(*_style_conf); } |
