Commit f14e8007 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Clipboard.c: do not send notify when pointer is NULL

There was only one place where this was checked but we check it always.
parent 3a3a3373
...@@ -714,6 +714,14 @@ FIXME: Do we need this? ...@@ -714,6 +714,14 @@ FIXME: Do we need this?
void nxagentSendSelectionNotify(Atom property) void nxagentSendSelectionNotify(Atom property)
{ {
if (lastClientClientPtr == NULL)
{
#ifdef DEBUG
fprintf(stderr, "%s: lastClientClientPtr is NULL - doing nothing.\n", __func__);
#endif
return;
}
xEvent x; xEvent x;
#ifdef DEBUG #ifdef DEBUG
...@@ -920,10 +928,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -920,10 +928,7 @@ void nxagentCollectPropertyEvent(int resource)
fprintf (stderr, "%s: WARNING! Invalid property value.\n", __func__); fprintf (stderr, "%s: WARNING! Invalid property value.\n", __func__);
#endif #endif
if (lastClientClientPtr != NULL) nxagentSendSelectionNotify(None);
{
nxagentSendSelectionNotify(None);
}
lastClientWindowPtr = NULL; lastClientWindowPtr = NULL;
SetClientSelectionStage(None); SetClientSelectionStage(None);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment