diff --git a/src/framework/graphics/graphicscontextresource.cpp b/src/framework/graphics/graphicscontextresource.cpp index f0f6375..1f56b0c 100644 --- a/src/framework/graphics/graphicscontextresource.cpp +++ b/src/framework/graphics/graphicscontextresource.cpp @@ -28,6 +28,8 @@ BOOL GraphicsContextResource::Initialize(GraphicsDevice *graphicsDevice) { STACK_TRACE; ASSERT(graphicsDevice != NULL); + if (graphicsDevice == NULL) + return FALSE; m_graphicsDevice = graphicsDevice; m_graphicsDevice->RegisterManagedResource(this);