diff --git a/CMakeLists.txt b/CMakeLists.txt index f1a5c2ea9..635c3c527 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 2.6) project(FreeRDP C) set(CMAKE_COLOR_MAKEFILE ON) diff --git a/libfreerdp-core/registry.c b/libfreerdp-core/registry.c index e25637aed..82a531781 100644 --- a/libfreerdp-core/registry.c +++ b/libfreerdp-core/registry.c @@ -86,6 +86,11 @@ void registry_print(rdpRegistry* registry, FILE* fp) void registry_create(rdpRegistry* registry) { registry->fp = fopen(registry->file, "w+"); + if (registry->fp == NULL) + { + printf("registry_create: error opening [%s] for writing\n", registry->file); + return; + } registry_print(registry, registry->fp); fflush(registry->fp); }