lib/shoes/swt/common/resource.rb in shoes-swt-4.0.0.pre10 vs lib/shoes/swt/common/resource.rb in shoes-swt-4.0.0.pre11

- old
+ new

@@ -11,10 +11,10 @@ track_graphics_context(graphics_context) end def dispose_previous_contexts @graphic_contexts ||= [] - @graphic_contexts.each { |g| g.dispose if g } + @graphic_contexts.each { |g| g&.dispose } @graphic_contexts.clear end def set_defaults_on_context(graphics_context) graphics_context.set_alpha OPAQUE