Skip to content

Commit cb3241d

Browse files
committed
Fix Bug
1 parent 5fe1ef8 commit cb3241d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

app/src/main/java/com/orange/signsatwork/biz/persistence/service/impl/UserServiceImpl.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,10 @@ public void changeNameVideoUrl(User user, String videoWebPath, String pictureUri
261261
String dailymotionUrlWithPlayerId = "https://geo.dailymotion.com/player/x11srk.html?video=";
262262
String videoIdFromUrl = null;
263263

264-
if (videoWebPath.startsWith(dailymotionUrl)) {
265-
videoIdFromUrl = videoWebPath.substring(videoWebPath.lastIndexOf('=') + 1);
264+
if (videoWebPath != null) {
265+
if (videoWebPath.startsWith(dailymotionUrl)) {
266+
videoIdFromUrl = videoWebPath.substring(videoWebPath.lastIndexOf('=') + 1);
267+
}
266268
}
267269
if (videoIdFromUrl != null) {
268270
videoWebPath = dailymotionUrlWithPlayerId + videoIdFromUrl;
@@ -279,8 +281,10 @@ public void changeDescriptionVideoUrl(User user, String videoWebPath, String pic
279281
String dailymotionUrlWithPlayerId = "https://geo.dailymotion.com/player/x11srk.html?video=";
280282
String videoIdFromUrl = null;
281283

282-
if (videoWebPath.startsWith(dailymotionUrl)) {
283-
videoIdFromUrl = videoWebPath.substring(videoWebPath.lastIndexOf('=') + 1);
284+
if (videoWebPath != null) {
285+
if (videoWebPath.startsWith(dailymotionUrl)) {
286+
videoIdFromUrl = videoWebPath.substring(videoWebPath.lastIndexOf('=') + 1);
287+
}
284288
}
285289
if (videoIdFromUrl != null) {
286290
videoWebPath = dailymotionUrlWithPlayerId + videoIdFromUrl;

0 commit comments

Comments
 (0)