summaryrefslogtreecommitdiff
path: root/src/frame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.cc')
-rw-r--r--src/frame.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/frame.cc b/src/frame.cc
index 4b94fcb..23d98ce 100644
--- a/src/frame.cc
+++ b/src/frame.cc
@@ -34,7 +34,7 @@
Frame::Frame(unsigned char *d, int sz)
{
data = (unsigned char *)malloc(sz);
- memcpy(data, d, sz);
+ if(d) memcpy(data, d, sz);
size = sz;
}