diff --git a/Text/Libyaml.hs b/Text/Libyaml.hs
--- a/Text/Libyaml.hs
+++ b/Text/Libyaml.hs
@@ -453,6 +453,7 @@
 instance Exception ToEventRawException
 
 decode :: MonadResource m => B.ByteString -> GSource m Event
+decode bs | B8.null bs = return ()
 decode bs =
     bracketP alloc cleanup (runParser . fst)
   where
diff --git a/test/main.hs b/test/main.hs
--- a/test/main.hs
+++ b/test/main.hs
@@ -61,6 +61,8 @@
         it "parses when all lowercase" caseLowercaseBool
         it "parses when all uppercase" caseUppercaseBool
         it "parses when titlecase" caseTitlecaseBool
+    describe "empty input" $ do
+        it "doesn't crash" caseEmptyInput
 
 counter :: Monad m => (Y.Event -> Bool) -> C.Sink Y.Event m Int
 counter pred' =
@@ -322,3 +324,6 @@
 caseLowercaseBool = D.decode "foo: off\nbar: y\nbaz: true" @?= obj
 caseUppercaseBool = D.decode "foo: FALSE\nbar: Y\nbaz: ON" @?= obj
 caseTitlecaseBool = D.decode "foo: No\nbar: Yes\nbaz: True" @?= obj
+
+caseEmptyInput :: Assertion
+caseEmptyInput = D.decode B8.empty @?= (Nothing :: Maybe D.Value)
diff --git a/yaml.cabal b/yaml.cabal
--- a/yaml.cabal
+++ b/yaml.cabal
@@ -1,5 +1,5 @@
 name:            yaml
-version:         0.8.0
+version:         0.8.0.1
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov 
