summaryrefslogtreecommitdiff
path: root/src/frame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.cc')
-rw-r--r--src/frame.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/frame.cc b/src/frame.cc
index ee5451d..c6a2848 100644
--- a/src/frame.cc
+++ b/src/frame.cc
@@ -31,6 +31,11 @@
/*
* $Log$
+ * Revision 1.8 2005/06/02 20:45:01 deva
+ *
+ * Added clear button
+ * Optimized the frame handling a little (very little!).
+ *
* Revision 1.7 2005/05/22 15:49:22 deva
* Added multithreaded encoding support.
*
@@ -51,8 +56,8 @@
Frame::Frame(unsigned char *d, int sz)
{
- data = (unsigned char *)malloc(sz);
- if(d) memcpy(data, d, sz);
+ if(sz) data = (unsigned char *)malloc(sz);
+ if(sz && d) memcpy(data, d, sz);
size = sz;
number = 0;
}