graphics/grOGL1.c Dereference of null pointer

Looks like the code below requires mw!=NULL to do anything useful.
So when mw==NULL we don't continue processing X11 Event.

SonarCloud
graphics/grOGL1.c:563 Dereference of null pointer
https://sonarcloud.io/project/issues?open=AZJB16z6NGfDNup0Riss&id=dlmiles_magic
This commit is contained in:
Darryl L. Miles 2024-09-29 23:00:00 +01:00 committed by Tim Edwards
parent be258c6557
commit 29ee094074
1 changed files with 2 additions and 0 deletions

View File

@ -557,6 +557,8 @@ pipehandler()
entry = HashLookOnly(&grOGLWindowTable, ExposeEvent->window);
mw = (entry) ? (MagWindow *)HashGetValue(entry) : 0;
if(!mw)
break;
screenRect.r_xbot = ExposeEvent->x;
screenRect.r_xtop = ExposeEvent->x + ExposeEvent->width;