Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > by-pkgid > 8604cbc4d16ebbba706929d8df6004ee > files > 5

nspluginwrapper-1.1.0-7mdv2009.0.src.rpm

diff -up nspluginwrapper-1.1.0/src/npw-rpc.c.old nspluginwrapper-1.1.0/src/npw-rpc.c
--- nspluginwrapper-1.1.0/src/npw-rpc.c.old	2008-07-06 17:33:14.000000000 +0200
+++ nspluginwrapper-1.1.0/src/npw-rpc.c	2008-08-01 20:45:33.000000000 +0200
@@ -381,7 +381,8 @@ static int do_send_NPSetWindowCallbackSt
 	  return error;
 	if ((error = rpc_message_send_int32(message, ws_info->type)) < 0)
 	  return error;
-	if ((error = rpc_message_send_uint32(message, XVisualIDFromVisual(ws_info->visual))) < 0)
+	uint32_t visual_id = ws_info->visual != NULL ? XVisualIDFromVisual(ws_info->visual) : 0;
+	if ((error = rpc_message_send_uint32(message, visual_id)) < 0)
 	  return error;
 	if ((error = rpc_message_send_uint32(message, ws_info->colormap)) < 0)
 	  return error;