[Kernel/XAM] XamContentGetCreator: Added check for existing content
This commit is contained in:
parent
ea9625fca8
commit
f298d7620a
|
@ -280,17 +280,24 @@ dword_result_t XamContentGetCreator(dword_t user_index,
|
||||||
auto content_data =
|
auto content_data =
|
||||||
static_cast<ContentData>(*content_data_ptr.as<XCONTENT_DATA*>());
|
static_cast<ContentData>(*content_data_ptr.as<XCONTENT_DATA*>());
|
||||||
|
|
||||||
if (content_data.content_type == 1) {
|
bool content_exists =
|
||||||
// User always creates saves.
|
kernel_state()->content_manager()->ContentExists(content_data);
|
||||||
*is_creator_ptr = 1;
|
|
||||||
if (creator_xuid_ptr) {
|
if (content_exists) {
|
||||||
*creator_xuid_ptr = kernel_state()->user_profile()->xuid();
|
if (content_data.content_type == 1) {
|
||||||
|
// User always creates saves.
|
||||||
|
*is_creator_ptr = 1;
|
||||||
|
if (creator_xuid_ptr) {
|
||||||
|
*creator_xuid_ptr = kernel_state()->user_profile()->xuid();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
*is_creator_ptr = 0;
|
||||||
|
if (creator_xuid_ptr) {
|
||||||
|
*creator_xuid_ptr = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
*is_creator_ptr = 0;
|
result = X_ERROR_PATH_NOT_FOUND;
|
||||||
if (creator_xuid_ptr) {
|
|
||||||
*creator_xuid_ptr = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overlapped_ptr) {
|
if (overlapped_ptr) {
|
||||||
|
|
Loading…
Reference in New Issue