diff --git a/hgext/histedit.py b/hgext/histedit.py
index 06b64fabf91c5fe886afe45b48b8970128e171ae_aGdleHQvaGlzdGVkaXQucHk=..f4065c3f09b81d2f16e86ec9857fb216b2db956c_aGdleHQvaGlzdGVkaXQucHk= 100644
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -533,7 +533,8 @@
             summary = cmdutil.rendertemplate(
                 ctx, ui.config(b'histedit', b'summary-template')
             )
-        summary = summary.splitlines()[0]
+        # Handle the fact that `''.splitlines() => []`
+        summary = summary.splitlines()[0] if summary else b''
         line = b'%s %s %s' % (self.verb, ctx, summary)
         # trim to 75 columns by default so it's not stupidly wide in my editor
         # (the 5 more are left for verb)