From 8ccc46a7386bfb4510cd8d017dc6779e8aae5948 Mon Sep 17 00:00:00 2001 From: smallsql Date: Thu, 16 Jun 2011 20:16:03 +0000 Subject: [PATCH] fix a NPE with printing after the last change --- awt/graphics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awt/graphics.cs b/awt/graphics.cs index 88ec5579..7ba82f41 100644 --- a/awt/graphics.cs +++ b/awt/graphics.cs @@ -167,7 +167,7 @@ namespace ikvm.awt // this is required to simulate Graphics.create(), which is not possible in .NET // we simply call Save on create() an restore this state, if any method is called // on the current graphics. This will work for almost any use case of create() - if (baseContext.Current != this) + if (baseContext != null && baseContext.Current != this) { if (!baseContext.Current.disposed) {