i assume you use engine panels
so copying one of your structs with the PANEL* pointer does NOT copy the panel but the reference to it. so you are currently really using only one panel. to copy a PANEL* you need to create a new panel and set all parameters in your code, memcpy would fail here because of the internal engine layout