Skip to content
Snippets Groups Projects
Commit eff6d018 authored by echicken's avatar echicken
Browse files

If the user's data/user/####.ini file

doesn't exist, avatar_lib.read_localuser
may return false instead of null. Just
do a loose falsey test.
parent ea1a6a90
Branches
Tags
No related merge requests found
......@@ -387,7 +387,7 @@ function MainMenu(parent_frame) {
function load_user_avatar() {
var user_avatar = avatar_lib.read_localuser(user.number);
if (user_avatar !== null) {
if (user_avatar) {
frames.user_avatar.clear();
frames.user_avatar.drawBorder(BORDER);
frames.user_avatar.blit(base64_decode(user_avatar.data), avatar_lib.defs.width, avatar_lib.defs.height, 1, 1, 'My Avatar', WHITE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment