diff --git a/examples/Example.h b/examples/Example.h index 583ffc9f..d1680159 100644 --- a/examples/Example.h +++ b/examples/Example.h @@ -90,6 +90,11 @@ struct Example auto rpath = realpath(path, buf); #endif + if (!rpath) { + cout << "Couldn't open directory \"" << path << "\"." << endl; + return; + } + //open directory #ifdef _WIN32 WIN32_FIND_DATA fd;