gui: Prevent assertion failure on debug builds.