diff --git a/src/event.rs b/src/event.rs
index 45c0438a7cb44de393b9ef1eb42dca27795fb365..4c70ea9ea9e547059a8519398f6f88e2a3c18f25 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -315,12 +315,17 @@ fn parse_utf8_char<I>(c: u8, iter: &mut I) -> Result<char, Error>
         bytes.push(c);
 
         loop {
-            bytes.push(iter.next().unwrap().unwrap());
-            if let Ok(st) = str::from_utf8(bytes) {
-                return Ok(st.chars().next().unwrap());
-            }
-            if bytes.len() >= 4 {
-                return error;
+            match iter.next() {
+                Some(Ok(next)) => {
+                    bytes.push(next);
+                    if let Ok(st) = str::from_utf8(bytes) {
+                        return Ok(st.chars().next().unwrap());
+                    }
+                    if bytes.len() >= 4 {
+                        return error;
+                    }
+                }
+                _ => return error,
             }
         }
     }