From 7f2c1e802f7dc4be8d0706acd79cee345e28b49c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 11 May 2007 22:21:29 +0000 Subject: [PATCH] fix crash in debug info git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21111 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp b/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp index b5c42341d8..87df6f4cd5 100644 --- a/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp +++ b/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp @@ -34,7 +34,7 @@ CamStreamingDeframer::Write(const void *buffer, size_t size) int bufsize = size; bool detach = false; bool discard = false; - PRINT((CH "(%p, %d); state=%s framesz=%u queued=%u" CT, buffer, size, (fState==ST_SYNC)?"sync":"frame", (size_t)fCurrentFrame->Position(), (size_t)fInputBuff.Position())); + PRINT((CH "(%p, %d); state=%s framesz=%u queued=%u" CT, buffer, size, (fState==ST_SYNC)?"sync":"frame", (size_t)(fCurrentFrame?(fCurrentFrame->Position()):-1), (size_t)fInputBuff.Position())); if (!fCurrentFrame) { BAutolock l(fLocker); if (fFrames.CountItems() < MAXFRAMEBUF)