diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-06-09 01:42:59 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-06-09 01:42:59 +0200 |
commit | e2a5d674d9d22492220200824a9ec28f95a02253 (patch) | |
tree | 58bf21df6e2d3c4c16e05b0c8608d03675f5e58b /sys/src/libdraw/replclipr.c | |
parent | 0fc761bc845bd9795f05206e24621c0f5e76423e (diff) |
libdraw: consistent use of nil for pointers, error handling
Diffstat (limited to 'sys/src/libdraw/replclipr.c')
-rw-r--r-- | sys/src/libdraw/replclipr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/libdraw/replclipr.c b/sys/src/libdraw/replclipr.c index ffd24b47b..00667e283 100644 --- a/sys/src/libdraw/replclipr.c +++ b/sys/src/libdraw/replclipr.c @@ -8,6 +8,10 @@ replclipr(Image *i, int repl, Rectangle clipr) uchar *b; b = bufimage(i->display, 22); + if(b == nil){ + fprint(2, "replclipr: %r\n"); + return; + } b[0] = 'c'; BPLONG(b+1, i->id); repl = repl!=0; |