Safer code

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13275 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2005-06-25 13:58:55 +00:00
parent 55b222b0b0
commit 89d0b3cdad

View File

@ -1935,9 +1935,14 @@ status_t ret = B_ERROR;
screen_id id;
link.Read<screen_id>(&id);
fLink.StartMessage(SERVER_TRUE);
fLink.Attach<color_map>(*SystemColorMap());
const color_map *colorMap = SystemColorMap();
if (colorMap != NULL) {
fLink.StartMessage(SERVER_TRUE);
fLink.Attach<color_map>(*colorMap);
} else
fLink.StartMessage(SERVER_FALSE);
fLink.Flush();
break;
}