diff --git a/lib/image_optim/worker/pngout.rb b/lib/image_optim/worker/pngout.rb index 9823ab03..ffa69d04 100644 --- a/lib/image_optim/worker/pngout.rb +++ b/lib/image_optim/worker/pngout.rb @@ -32,6 +32,10 @@ def optimize(src, dst) #{dst} ] execute(:pngout, *args) && optimized?(src, dst) + rescue SignalException => e + raise unless Signal.list.key(e.signo) == 'SEGV' + raise unless resolve_bin!(:pngout).version <= '20150920' + warn "pngout caused Segmentation fault for #{src}" end end end