From 53dc7ec149b4005710afb89e797e36ae316a0cfa Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 3 Dec 2017 20:27:08 +1030 Subject: [PATCH 01/13] Fix crash in glib demo on mingw --- goo/glibc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/goo/glibc.cc b/goo/glibc.cc index 4968047f..34cd7772 100644 --- a/goo/glibc.cc +++ b/goo/glibc.cc @@ -28,7 +28,8 @@ struct tm *localtime_r(const time_t *timep, struct tm *result) { struct tm *lt; lt = localtime(timep); - *result = *lt; + if (lt) + *result = *lt; return lt; } #endif -- 2.11.0