diff --git a/src/r_main.c b/src/r_main.c
index dcb69b662977584221a2f12a6a35e05bd77bf77c..32e3138eb07fbe1abc736c382cc66de389084b64 100644
--- a/src/r_main.c
+++ b/src/r_main.c
@@ -1153,7 +1153,7 @@ void R_SetupFrame(player_t *player)
 		if (quake.epicenter) {
 			// Calculate 3D distance from epicenter, using the camera.
 			fixed_t xydist, dist;
-			if (r_viewmobj == NULL) {
+			if (P_MobjWasRemoved(r_viewmobj)) {
 				xydist = R_PointToDist2(thiscam->x, thiscam->y, quake.epicenter->x, quake.epicenter->y);
 				dist = R_PointToDist2(0, thiscam->z, xydist, quake.epicenter->z);
 			} else {