Created
November 17, 2018 12:50
-
-
Save ryo/8fe6df6dc9c17ab950cbc2a07302bbd0 to your computer and use it in GitHub Desktop.
don't use "this == NULL"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- icewm-1.2.38pre2/src/wmapp.cc.orig 2018-11-17 21:38:20.514477855 +0900 | |
+++ icewm-1.2.38pre2/src/wmapp.cc 2018-11-17 21:18:08.144145670 +0900 | |
@@ -608,14 +608,21 @@ | |
for (int a = 0; a <= 1; a++) { | |
for (int b = 0; b <= 1; b++) { | |
- frameT[a][b]->replicate(true, copyMask); | |
- frameB[a][b]->replicate(true, copyMask); | |
- frameL[a][b]->replicate(false, copyMask); | |
- frameR[a][b]->replicate(false, copyMask); | |
+ if (frameT[a][b] != null) | |
+ frameT[a][b]->replicate(true, copyMask); | |
+ if (frameB[a][b] != null) | |
+ frameB[a][b]->replicate(true, copyMask); | |
+ if (frameL[a][b] != null) | |
+ frameL[a][b]->replicate(false, copyMask); | |
+ if (frameR[a][b] != null) | |
+ frameR[a][b]->replicate(false, copyMask); | |
} | |
- titleS[a]->replicate(true, copyMask); | |
- titleT[a]->replicate(true, copyMask); | |
- titleB[a]->replicate(true, copyMask); | |
+ if (titleS[a] != null) | |
+ titleS[a]->replicate(true, copyMask); | |
+ if (titleT[a] != null) | |
+ titleT[a]->replicate(true, copyMask); | |
+ if (titleB[a] != null) | |
+ titleB[a]->replicate(true, copyMask); | |
} | |
menuButton[0] = paths.loadPixmap(0, "menuButtonI.xpm"); | |
--- icewm-1.2.38pre2/src/yimage.cc.orig 2009-11-09 03:59:46.000000000 +0900 | |
+++ icewm-1.2.38pre2/src/yimage.cc 2018-11-17 21:41:50.574372282 +0900 | |
@@ -244,7 +244,7 @@ | |
} | |
void YPixmap::replicate(bool horiz, bool copyMask) { | |
- if (this == NULL || pixmap() == None || (fMask == None && copyMask)) | |
+ if (pixmap() == None || (fMask == None && copyMask)) | |
return; | |
int dim(horiz ? width() : height()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment