summaryrefslogtreecommitdiff
path: root/src/frame.cc
diff options
context:
space:
mode:
authordeva <deva>2005-06-02 20:45:01 +0000
committerdeva <deva>2005-06-02 20:45:01 +0000
commit64efd74ecfa761c83b70ec2374bf448b6e42e254 (patch)
tree607ccb672f904dd415a7b589bb80000753e76fe5 /src/frame.cc
parenta17e42c900e2709444b12a5db2847e850f3dd6cd (diff)
Added clear button
Optimized the frame handling a little (very little!).
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;
}