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:
@@ -243,13 +243,16 @@ AppearancePrefView::MessageReceived(BMessage* msg)
|
|||||||
case MSG_COLOR_SCHEMA_CHANGED:
|
case MSG_COLOR_SCHEMA_CHANGED:
|
||||||
{
|
{
|
||||||
color_schema* newSchema = NULL;
|
color_schema* newSchema = NULL;
|
||||||
msg->FindPointer("color_schema", (void**)&newSchema);
|
if (msg->FindPointer("color_schema",
|
||||||
|
(void**)&newSchema) == B_OK) {
|
||||||
|
|
||||||
if (newSchema == &gCustomSchema)
|
if (newSchema == &gCustomSchema)
|
||||||
_EnableCustomColors(true);
|
_EnableCustomColors(true);
|
||||||
else
|
else
|
||||||
_EnableCustomColors(false);
|
_EnableCustomColors(false);
|
||||||
_ChangeColorSchema(newSchema);
|
_ChangeColorSchema(newSchema);
|
||||||
modified = true;
|
modified = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ const color_schema *gPredefinedSchemas[] = {
|
|||||||
&kBlackOnWhite,
|
&kBlackOnWhite,
|
||||||
&kWhiteOnBlack,
|
&kWhiteOnBlack,
|
||||||
&gCustomSchema,
|
&gCustomSchema,
|
||||||
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user