comparison os2/dw.c @ 1397:2ccf7eacedf5

Safety checks in dw_bitmapbutton_new*() on Windows and OS/2.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 27 Nov 2011 11:01:01 +0000
parents e0a66f06501c
children 152e3c8916de
comparison
equal deleted inserted replaced
1396:117cc38a3799 1397:2ccf7eacedf5
5712 HWND_TOP, 5712 HWND_TOP,
5713 id, 5713 id,
5714 NULL, 5714 NULL,
5715 NULL); 5715 NULL);
5716 5716
5717 strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); 5717 if(text)
5718 strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1);
5718 blah->oldproc = WinSubclassWindow(tmp, _BtProc); 5719 blah->oldproc = WinSubclassWindow(tmp, _BtProc);
5719 5720
5720 WinSetWindowPtr(tmp, QWP_USER, blah); 5721 WinSetWindowPtr(tmp, QWP_USER, blah);
5721 5722
5722 if(icon) 5723 if(icon)
5809 } 5810 }
5810 _foreground = fore; 5811 _foreground = fore;
5811 } 5812 }
5812 } 5813 }
5813 5814
5814 strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); 5815 if(text)
5816 strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1);
5815 blah->oldproc = WinSubclassWindow(tmp, _BtProc); 5817 blah->oldproc = WinSubclassWindow(tmp, _BtProc);
5816 5818
5817 WinSetWindowPtr(tmp, QWP_USER, blah); 5819 WinSetWindowPtr(tmp, QWP_USER, blah);
5818 5820
5819 if(icon) 5821 if(icon)
5907 } 5909 }
5908 _foreground = fore; 5910 _foreground = fore;
5909 } 5911 }
5910 } 5912 }
5911 5913
5912 strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); 5914 if(text)
5915 strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1);
5913 blah->oldproc = WinSubclassWindow(tmp, _BtProc); 5916 blah->oldproc = WinSubclassWindow(tmp, _BtProc);
5914 5917
5915 WinSetWindowPtr(tmp, QWP_USER, blah); 5918 WinSetWindowPtr(tmp, QWP_USER, blah);
5916 5919
5917 if(icon) 5920 if(icon)