From 4316979264079cb84509120f9179cdd40c5a7021 Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Sat, 22 Jan 2005 23:24:28 +0000 Subject: [PATCH] fix NULL pmf initialization --- SheepShaver/src/kpx_cpu/include/nvmemfun.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SheepShaver/src/kpx_cpu/include/nvmemfun.hpp b/SheepShaver/src/kpx_cpu/include/nvmemfun.hpp index 4d64b7bc..b8d15afe 100644 --- a/SheepShaver/src/kpx_cpu/include/nvmemfun.hpp +++ b/SheepShaver/src/kpx_cpu/include/nvmemfun.hpp @@ -27,6 +27,8 @@ template< class PMF, class PF > inline PF nv_mem_fun_of(PMF pmf) { + if (pmf == NULL) + return NULL; union { PMF pmf; uintptr p[2]; } x; x.pmf = pmf; #if defined(__GXX_ABI_VERSION) /* GCC >= 3.0 */