segfault in master 3.0.x checking for empty realm