mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[client] ds: validate the ds before attempting to use it
This commit is contained in:
parent
f8ac860fde
commit
2d1e3c8022
@ -141,4 +141,26 @@ struct LG_DisplayServerOps
|
||||
void (*cbRequest)(LG_ClipboardData type);
|
||||
};
|
||||
|
||||
#define IS_LG_DS_VALID(x) \
|
||||
((x)->probe && \
|
||||
(x)->earlyInit && \
|
||||
(x)->init && \
|
||||
(x)->startup && \
|
||||
(x)->shutdown && \
|
||||
(x)->free && \
|
||||
(x)->getProp && \
|
||||
(x)->getEGLDisplay && \
|
||||
(x)->getEGLNativeWindow && \
|
||||
(x)->glSwapBuffers && \
|
||||
(x)->showPointer && \
|
||||
(x)->grabPointer && \
|
||||
(x)->ungrabPointer && \
|
||||
(x)->warpPointer && \
|
||||
(x)->realignPointer && \
|
||||
(x)->isValidPointerPos && \
|
||||
(x)->inhibitIdle && \
|
||||
(x)->uninhibitIdle && \
|
||||
(x)->wait && \
|
||||
(x)->setWindowSize && \
|
||||
(x)->setFullscreen)
|
||||
#endif
|
||||
|
@ -633,6 +633,7 @@ static int lg_run(void)
|
||||
}
|
||||
|
||||
assert(g_state.ds);
|
||||
assert(IS_LG_DS_VALID(g_state.ds));
|
||||
|
||||
// init the subsystem
|
||||
if (!g_state.ds->earlyInit())
|
||||
|
Loading…
Reference in New Issue
Block a user