mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 09:53:00 +02:00
graphics/grX11su1.c: Dereference of null pointer
Looks like the code below requires w!=NULL to do anything useful. So when w==NULL we don't continue processing X11 Event. SonarCloud graphics/grX11su1.c:842 Dereference of null pointer https://sonarcloud.io/project/issues?open=AZJB163RNGfDNup0Ri4o&id=dlmiles_magic
This commit is contained in:
committed by
Tim Edwards
parent
cb31675174
commit
01f9f2246b
@@ -835,6 +835,8 @@ grX11Stdin()
|
||||
entry = HashLookOnly(&grX11WindowTable,grCurrent.window);
|
||||
w = (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
grCurrent.mw=w;
|
||||
if(!w)
|
||||
break;
|
||||
|
||||
screenRect.r_xbot = ExposeEvent->x;
|
||||
screenRect.r_xtop = ExposeEvent->x+ExposeEvent->width;
|
||||
|
||||
Reference in New Issue
Block a user