Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlxUIColorSwatchSelecter crashes #196

Open
DleanJeans opened this issue Aug 28, 2016 · 2 comments
Open

FlxUIColorSwatchSelecter crashes #196

DleanJeans opened this issue Aug 28, 2016 · 2 comments

Comments

@DleanJeans
Copy link
Contributor

DleanJeans commented Aug 28, 2016

I simply created it like this:

var colorSwatch = new FlxUIColorSwatchSelecter(50, 400, null, [0xFF0000, 0x00FF00, 0x0000FF]);
add(colorSwatch);

Then it crashes while setting the midTone because the colors is null.

@Gama11 Gama11 added the Bug label Aug 28, 2016
@6J7KZg2f
Copy link

This is still broken, FlxUIColorSwatch literally cannot be constructed without failure.

First the Super call in the constructor results in a call to the overriden set_color which assumes colors is not null.

Then even failing that,

if (Colors != null) {
	multiColored = true;
	colors = Colors;
}

Setting multiColored invokes set_multiColored which eventually bubbles down to colorKey() which again assumes that colors is not null.

There's no situation I've been able to find in which this component won't cause a crash.

@larsiusprime
Copy link
Member

larsiusprime commented Dec 11, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants