Style.
Add NULL guard to the color schemes struct, although the code was safe neverthless (for now) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37575 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5b3d789879
commit
7071dfc1d1
@ -243,13 +243,16 @@ AppearancePrefView::MessageReceived(BMessage* msg)
|
||||
case MSG_COLOR_SCHEMA_CHANGED:
|
||||
{
|
||||
color_schema* newSchema = NULL;
|
||||
msg->FindPointer("color_schema", (void**)&newSchema);
|
||||
if (msg->FindPointer("color_schema",
|
||||
(void**)&newSchema) == B_OK) {
|
||||
|
||||
if (newSchema == &gCustomSchema)
|
||||
_EnableCustomColors(true);
|
||||
else
|
||||
_EnableCustomColors(false);
|
||||
_ChangeColorSchema(newSchema);
|
||||
modified = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,7 @@ const color_schema *gPredefinedSchemas[] = {
|
||||
&kBlackOnWhite,
|
||||
&kWhiteOnBlack,
|
||||
&gCustomSchema,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user