diff --git a/dim b/dim
index d2649150930866c1250b39dd01f5c00d06fb6fb7..dde2164efa6b4a04d7c84ebd65d6ab407617f427 100755
--- a/dim
+++ b/dim
@@ -429,6 +429,8 @@ function dim_pull_request
 	branch=$1
 	upstream=$2
 
+	assert_branch $branch
+
 	git fetch ${upstream%%/*} >& /dev/null || true
 	echo "Using $upstream as the upstream"