From 8f5b6c1fbda87db059c3131a90d5896886837659 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 5 Nov 2006 18:00:53 +0000 Subject: [PATCH] * Don't crash if Blit()'s second canvas argument is NULL (which is valid). --- cxx/cucul++.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cxx/cucul++.cpp b/cxx/cucul++.cpp index cb02e9d..b503a77 100644 --- a/cxx/cucul++.cpp +++ b/cxx/cucul++.cpp @@ -132,7 +132,8 @@ void Cucul::Clear(void) void Cucul::Blit(int x, int y, Cucul* c1, Cucul* c2) { - cucul_blit(cv, x, y, c1->get_cucul_canvas_t(), c2->get_cucul_canvas_t()); + cucul_blit(cv, x, y, c1->get_cucul_canvas_t(), + c2 ? c2->get_cucul_canvas_t() : NULL); } void Cucul::Invert()