Skip to content

Commit fa691d8

Browse files
committed
Fixed Memory Leaks in UiStateManager
1 parent 29fc65f commit fa691d8

File tree

1 file changed

+3
-1
lines changed
  • SuperiorPlugin/src/main/java/com/scrappers/superiorExtendedEngine/menuStates

1 file changed

+3
-1
lines changed

SuperiorPlugin/src/main/java/com/scrappers/superiorExtendedEngine/menuStates/UiStateManager.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ public class UiStateManager extends RelativeLayout {
3434
public UiStateManager(ViewGroup context) {
3535
super(context.getContext());
3636
/*attach the parent View state*/
37-
setLayoutParams(new LayoutParams(context.getLayoutParams().width,context.getLayoutParams().height));
37+
if(context.getLayoutParams() != null) {
38+
setLayoutParams(new LayoutParams(context.getLayoutParams().width, context.getLayoutParams().height));
39+
}
3840
context.addView(this);
3941
this.context=context;
4042
}

0 commit comments

Comments
 (0)