Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
don't use "this == NULL"
--- 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