Github user mike-jumper commented on a diff in the pull request:
https://github.com/apache/incubator-guacamole-server/pull/109#discussion_r143374493
--- Diff: src/protocols/vnc/user.c ---
@@ -112,6 +112,9 @@ int guac_vnc_user_leave_handler(guac_user* user) {
guac_vnc_client* vnc_client = (guac_vnc_client*) user->client->data;
+ if (!vnc_client || !user || !vnc_client->display ||
!vnc_client->display->cursor)
--- End diff --
> I do not mind if you want to determine the root cause of GUACAMOLE-388
Excellent, as that's really the first step before attempting any sort of
fix. It's not a good idea to simply cast a wide net without knowing the actual
cause, and then call it fixed when the problem cannot be reproduced.
> what I wanted to do is to add check for null, it still makes sense, i.e.
"check for null before dereferencing the pointer". it will help if something
will change later on the caller side.
No, blanket/paranoid checks are not good practice. We shouldn't be checking
for `NULL` simply as a matter of course. Things should be written purposefully,
and we should know what we're passing in. Coding defensively like that is
self-defeating.
---