summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f565319)
../src/common/dpycmn.cpp(119): assert "n <GetCount ()" failed in wxDisplay (): An invalid index was passed to wxDisplay
seen on Ubuntu 19.04; I can't reproduce it myself but the user reports that
this fixes it.
}
_splitter = new LimitedSplitter (n);
}
_splitter = new LimitedSplitter (n);
- wxDisplay display (wxDisplay::GetFromWindow(_splitter));
- wxRect screen = display.GetClientArea();
+ optional<wxRect> screen;
+ int const sn = wxDisplay::GetFromWindow(_splitter);
+ if (sn >= 0) {
+ screen = wxDisplay(sn).GetClientArea();
+ }
wxPanel* top = new wxPanel (_splitter);
_menu = new ContentMenu (_splitter);
wxPanel* top = new wxPanel (_splitter);
_menu = new ContentMenu (_splitter);
/* This is a hack to try and make the content notebook a sensible size; large on big displays but small
enough on small displays to leave space for the content area.
*/
/* This is a hack to try and make the content notebook a sensible size; large on big displays but small
enough on small displays to leave space for the content area.
*/
- _splitter->SplitHorizontally (top, _notebook, screen.height > 800 ? -600 : -150);
+ if (screen) {
+ _splitter->SplitHorizontally (top, _notebook, screen->height > 800 ? -600 : -150);
+ }
_timing_panel = new TimingPanel (this, _film_viewer);
_notebook->AddPage (_timing_panel, _("Timing"), false);
_timing_panel = new TimingPanel (this, _film_viewer);
_notebook->AddPage (_timing_panel, _("Timing"), false);