lc-soft / LCUI

C library for building user interfaces
https://lcui-dev.github.io
MIT License
4.13k stars 356 forks source link

Segmentation fault on resize empty window. #198

Closed vbalyasnyy closed 4 years ago

vbalyasnyy commented 4 years ago

Segmentation fault on next simple code:

int main(void)
{
    LCUI_Init();
    LCUIDisplay_SetSize(320, 239);
    return LCUI_Main();
}

Steps to reproduce the behavior:

  1. Compile example above.
  2. Launch it.

Environment:

Reason of crash:

p.s. but, if use LCUIDisplay_SetSize(321, 241) in example, it is not crashed, couse it updates correctly and creates surface->pixmap and surface->gc and empty widget render successfully