Skip to content

Commit

Permalink
Xic: Fixed bug, press/hold button 3 in drawing window, move pointer
Browse files Browse the repository at this point in the history
out of Xic and release -> seg. fault.
  • Loading branch information
wrcad committed Apr 27, 2020
1 parent 6a52dc7 commit 37d0aeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xic/src/main/events.cc
Original file line number Diff line number Diff line change
Expand Up @@ -940,14 +940,14 @@ cEventHdlr::ZoomPress(WindowDesc *wdesc, int x, int y, int state)
void
cEventHdlr::ZoomRelease(WindowDesc *wdesc, int x, int y, int state)
{
if (!ZoomCmd)
if (!ZoomCmd || !wdesc)
return;
WindowDesc *initdesc = DSP()->Windesc(ZoomCmd->InitId);
if (!initdesc) {
initdesc = wdesc;
ZoomCmd->InitId = wdesc->WindowId();
}
if (UpTimer() || !wdesc || !wdesc->IsSimilar(initdesc))
if (UpTimer() || !wdesc->IsSimilar(initdesc))
return;
if (!ZoomCmd->DidMark && (state & (GR_SHIFT_MASK | GR_CONTROL_MASK))) {
wdesc->PToL(x, y, x, y);
Expand Down

0 comments on commit 37d0aeb

Please sign in to comment.