This looks like a bug - g_mk is a pointer and can never assume an OK value.