diff --git a/source/common/utility/tarray.h b/source/common/utility/tarray.h
index dbd63002b..1df7e5d39 100644
--- a/source/common/utility/tarray.h
+++ b/source/common/utility/tarray.h
@@ -316,9 +316,16 @@ public:
 	// Returns a reference to the last element
 	T &Last() const
 	{
+		assert(Count > 0);
 		return Array[Count-1];
 	}
 
+	T SafeGet (size_t index, const T& defaultval) const
+	{
+		if (index <= Count) return Array[index];
+		else return defaultval;
+	}
+
 	// returns address of first element
 	T *Data() const
 	{
diff --git a/source/games/duke/src/sounds.cpp b/source/games/duke/src/sounds.cpp
index 50ed8c411..8f210771b 100644
--- a/source/games/duke/src/sounds.cpp
+++ b/source/games/duke/src/sounds.cpp
@@ -318,7 +318,7 @@ void S_GetCamera(DVector3* c, DAngle* ca, sectortype** cs)
 	if (ud.cameraactor == nullptr)
 	{
 		auto p = &ps[screenpeek];
-		if (c) *c = p->actor->spr.pos;
+		if (c) *c = p->pos;
 		if (cs) *cs = p->cursector;
 		if (ca) *ca = p->angle.ang;
 	}